mirror of
https://github.com/Respect/Validation.git
synced 2024-06-14 03:25:09 +02:00
4fd26e39bb
Since I've already renamed the "Optional" rule to "UnderOf," it makes sense to rename this rule too. Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
1.2 KiB
1.2 KiB
NotUndef
NotUndef()
Validates if the given input is not optional. By optional we consider null
or an empty string (''
).
v::notUndef()->validate(''); // false
v::notUndef()->validate(null); // false
Other values:
v::notUndef()->validate([]); // true
v::notUndef()->validate(' '); // true
v::notUndef()->validate(0); // true
v::notUndef()->validate('0'); // true
v::notUndef()->validate(0); // true
v::notUndef()->validate('0.0'); // true
v::notUndef()->validate(false); // true
v::notUndef()->validate(['']); // true
v::notUndef()->validate([' ']); // true
v::notUndef()->validate([0]); // true
v::notUndef()->validate(['0']); // true
v::notUndef()->validate([false]); // true
v::notUndef()->validate([[''), [0]]); // true
v::notUndef()->validate(new stdClass()); // true
Categorization
- Miscellaneous
Changelog
Version | Description |
---|---|
3.0.0 | Renamed from "NotOptional" to "NotUndef" |
1.0.0 | Created |
See also: