Skip to content

Commit

Permalink
fix: validation de résolutions côté symfony en phase avec validation …
Browse files Browse the repository at this point in the history
…côté client #529
  • Loading branch information
ocruze committed Nov 15, 2024
1 parent 1aabf0c commit 8a86eeb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Dto/CommonDTO.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function __construct(
// public readonly string $encoding,

#[Assert\Choice([
'choices' => ['', '25000', '75000', '100000', '150000', '200000', '250000', '1000000'], // TODO NON EXHAUSTI
'choices' => ['', '200', '500', '1000', '2000', '5000', '10000', '25000', '50000', '100000', '250000', '500000', '1000000', '5000000', '10000000'], // NOTE : doit correspondre à assets/data/md_resolutions.json
'message' => 'metadatas.resolution_error',
])]
public readonly string $resolution,
Expand Down
2 changes: 1 addition & 1 deletion src/Dto/Pyramid/PublishPyramidDTO.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function __construct(
// public readonly string $encoding,

#[Assert\Choice([
'choices' => ['', '25000', '75000', '100000', '150000', '200000', '250000', '1000000'], // TODO NON EXHAUSTIF
'choices' => ['', '200', '500', '1000', '2000', '5000', '10000', '25000', '50000', '100000', '250000', '500000', '1000000', '5000000', '10000000'], // NOTE : doit correspondre à assets/data/md_resolutions.json
'message' => 'common.resolution_error',
])]
public readonly ?string $resolution,
Expand Down
4 changes: 2 additions & 2 deletions src/Dto/WfsAddDTO.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function __construct(
// public readonly string $encoding,

#[Assert\Choice([
'choices' => ['', '25000', '75000', '100000', '150000', '200000', '250000', '1000000'], // TODO NON EXHAUSTIF
'choices' => ['', '200', '500', '1000', '2000', '5000', '10000', '25000', '50000', '100000', '250000', '500000', '1000000', '5000000', '10000000'], // NOTE : doit correspondre à assets/data/md_resolutions.json
'message' => 'common.resolution_error',
])]
public readonly ?string $resolution,
Expand All @@ -91,7 +91,7 @@ public function __construct(
* @var WfsTableDTO[]
*/
#[Assert\Valid]
public readonly array $table_infos
public readonly array $table_infos,
) {
}
}

0 comments on commit 8a86eeb

Please sign in to comment.