mirror of
https://github.com/Respect/Validation.git
synced 2024-05-17 21:56:40 +02:00
10df3211f5
Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
556 B
556 B
Optional
Optional(Validatable $rule)
Validates if the given input is optional or not. By optional we consider null
or an empty string (''
).
v::optional(v::alpha())->validate(''); // true
v::optional(v::digit())->validate(null); // true
Categorization
- Nesting
Changelog
Version | Description |
---|---|
1.0.0 | Created |
See also: