@@ 51-62 (lines=12) @@ | ||
48 | * Validation constraints for request data validation |
|
49 | * @return Assert\Collection |
|
50 | */ |
|
51 | public function getValidationConstraints() |
|
52 | { |
|
53 | return new Assert\Collection([ |
|
54 | 'code' => new Assert\Required([ |
|
55 | new Assert\NotBlank(), |
|
56 | new Code() |
|
57 | ]), |
|
58 | 'country' => new Assert\Required([ |
|
59 | new Assert\NotBlank(), |
|
60 | ]), |
|
61 | ]); |
|
62 | } |
|
63 | ||
64 | /** |
|
65 | * HTTP method to use |
@@ 63-75 (lines=13) @@ | ||
60 | * Validation constraints for fields |
|
61 | * @return Assert\Collection |
|
62 | */ |
|
63 | public function getValidationConstraints() |
|
64 | { |
|
65 | return new Assert\Collection([ |
|
66 | 'phone' => new Assert\Required([ |
|
67 | new Assert\NotBlank(), |
|
68 | new Phone(), |
|
69 | ]), |
|
70 | 'code' => new Assert\Required([ |
|
71 | new Assert\NotBlank(), |
|
72 | new Code() |
|
73 | ]) |
|
74 | ]); |
|
75 | } |
|
76 | ||
77 | /** |
|
78 | * HTTP method to use |