ListRule
class ListRule implements Stringable (View source)
Properties
| protected array | $constraints | The additional constraints for the list rule. |
Methods
The field under validation must have between the given min and max number of items (inclusive).
The field under validation must have exactly the given number of items.
The field under validation must not have more than the given number of items.
Convert the rule to a validation string.
Details
ListRule
between(int $min, int $max)
The field under validation must have between the given min and max number of items (inclusive).
ListRule
exactly(int $value)
The field under validation must have exactly the given number of items.
ListRule
max(int $value)
The field under validation must not have more than the given number of items.
ListRule
min(int $value)
The field under validation must have at least the given number of items.
string
__toString()
Convert the rule to a validation string.
protected ListRule
addRule(array|string $rules)
Add custom rules to the validation rules array.