You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 13, 2025. It is now read-only.
$this->message = $message ?? 'The "{{ name }}" value is not a valid choice, "{{ value }}" given. Accepted values are: "{{ constraints }}".';
30
+
$this->multipleMessage = $multipleMessage ?? 'The "{{ name }}" value has one or more invalid choices, "{{ value }}" given. Accepted values are: "{{ constraints }}".';
31
+
$this->minMessage = $minMessage ?? 'The "{{ name }}" value must have at least {{ minConstraint }} choices, {{ numValues }} choices given.';
32
+
$this->maxMessage = $maxMessage ?? 'The "{{ name }}" value must have at most {{ maxConstraint }} choices, {{ numValues }} choices given.';
class Range extends AbstractRule implements RuleInterface
13
12
{
14
13
use ComparableTrait;
15
14
16
-
privatearray$options;
15
+
privatestring$message;
17
16
18
17
publicfunction__construct(
19
18
privatereadonlymixed$minConstraint,
20
19
privatereadonlymixed$maxConstraint,
21
-
array$options = []
20
+
?string$message = null
22
21
)
23
22
{
24
-
$resolver = newOptionsResolver();
25
-
26
-
$resolver->setDefaults(['message' => 'The "{{ name }}" value should be between "{{ minConstraint }}" and "{{ maxConstraint }}", "{{ value }}" given.']);
27
-
28
-
$resolver->setAllowedTypes('message', 'string');
29
-
30
-
$this->options = $resolver->resolve($options);
23
+
$this->message = $message ?? 'The "{{ name }}" value should be between "{{ minConstraint }}" and "{{ maxConstraint }}", "{{ value }}" given.';
0 commit comments