6
6
7
7
interface StaticValidatorInterface
8
8
{
9
- public static function all (array $ constraints , array $ options = null ): ChainedValidatorInterface ;
10
-
11
- public static function choice (array $ constraints , bool $ multiple = false , ?int $ minConstraint = null , ?int $ maxConstraint = null , array $ options = []): ChainedValidatorInterface ;
12
-
13
- public static function greaterThan (mixed $ constraint , array $ options = []): ChainedValidatorInterface ;
14
-
15
- public static function greaterThanOrEqual (mixed $ constraint , array $ options = []): ChainedValidatorInterface ;
16
-
17
- public static function lessThan (mixed $ constraint , array $ options = []): ChainedValidatorInterface ;
18
-
19
- public static function lessThanOrEqual (mixed $ constraint , array $ options = []): ChainedValidatorInterface ;
20
-
21
- public static function notBlank (array $ options = []): ChainedValidatorInterface ;
22
-
23
- public static function range (mixed $ minConstraint , mixed $ maxConstraint , array $ options = []): ChainedValidatorInterface ;
9
+ public static function all (
10
+ array $ constraints ,
11
+ string $ message = 'At "{{ key }}": {{ message }} '
12
+ ): ChainedValidatorInterface ;
13
+
14
+ public static function choice (
15
+ array $ constraints ,
16
+ bool $ multiple = false ,
17
+ ?int $ minConstraint = null ,
18
+ ?int $ maxConstraint = null ,
19
+ string $ message = 'The "{{ name }}" value is not a valid choice, "{{ value }}" given. Accepted values are: "{{ constraints }}". ' ,
20
+ string $ multipleMessage = 'The "{{ name }}" value has one or more invalid choices, "{{ value }}" given. Accepted values are: "{{ constraints }}". ' ,
21
+ string $ minMessage = 'The "{{ name }}" value must have at least {{ minConstraint }} choices, {{ numValues }} choices given. ' ,
22
+ string $ maxMessage = 'The "{{ name }}" value must have at most {{ maxConstraint }} choices, {{ numValues }} choices given. '
23
+ ): ChainedValidatorInterface ;
24
+
25
+ public static function greaterThan (
26
+ mixed $ constraint ,
27
+ string $ message = 'The "{{ name }}" value should be greater than "{{ constraint }}", "{{ value }}" given. '
28
+ ): ChainedValidatorInterface ;
29
+
30
+ public static function greaterThanOrEqual (
31
+ mixed $ constraint ,
32
+ string $ message = 'The "{{ name }}" value should be greater than or equal to "{{ constraint }}", "{{ value }}" given. '
33
+ ): ChainedValidatorInterface ;
34
+
35
+ public static function lessThan (
36
+ mixed $ constraint ,
37
+ string $ message = 'The "{{ name }}" value should be less than "{{ constraint }}", "{{ value }}" given. '
38
+ ): ChainedValidatorInterface ;
39
+
40
+ public static function lessThanOrEqual (
41
+ mixed $ constraint ,
42
+ string $ message = 'The "{{ name }}" value should be less than or equal to "{{ constraint }}", "{{ value }}" given. '
43
+ ): ChainedValidatorInterface ;
44
+
45
+ public static function notBlank (
46
+ ?callable $ normalizer = null ,
47
+ string $ message = 'The "{{ name }}" value should not be blank, "{{ value }}" given. '
48
+ ): ChainedValidatorInterface ;
49
+
50
+ public static function range (
51
+ mixed $ minConstraint ,
52
+ mixed $ maxConstraint ,
53
+ string $ message = 'The "{{ name }}" value should be between "{{ minConstraint }}" and "{{ maxConstraint }}", "{{ value }}" given. '
54
+ ): ChainedValidatorInterface ;
24
55
25
56
public static function rule (RuleInterface $ constraint ): ChainedValidatorInterface ;
26
57
}
0 commit comments