mirror of
https://github.com/Respect/Validation.git
synced 2026-03-17 23:59:51 +01:00
The method has been renamed some time ago, but I haven't updated the documentation to cause less confusion. Now that I want to start updating the documentation, I switched the default branch on GitHub to the latest stable version, so I assume there will be less confusion in the documentation, and I can start updating the docs for the next version.
991 B
991 B
NotEmpty
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
Categorization
- Miscellaneous
Changelog
| Version | Description |
|---|---|
| 0.3.9 | Created |
See also: