NotEmpty()
Validates wether the given input is not empty. This function also takes whitespace
into account, use noWhitespace()
if no spaces or linebreaks and other
whitespace anywhere in the input is desired.
v::stringType()->notEmpty()->isValid(''); // false
Null values are empty:
v::notEmpty()->isValid(null); // false
Numbers:
v::intVal()->notEmpty()->isValid(0); // false
Empty arrays:
v::arrayVal()->notEmpty()->isValid([]); // false
Whitespace:
v::stringType()->notEmpty()->isValid(' '); //false
v::stringType()->notEmpty()->isValid("\t \n \r"); //false
- Miscellaneous
Version | Description |
---|---|
0.3.9 | Created |
See also: