tao-test/app/vendor/respect/validation/docs/rules/NoWhitespace.md

23 lines
483 B
Markdown
Raw Normal View History

2022-08-29 20:14:13 +02:00
# NoWhitespace
- `v::noWhitespace()`
Validates if a string contains no whitespace (spaces, tabs and line breaks);
```php
v::noWhitespace()->validate('foo bar'); //false
v::noWhitespace()->validate("foo\nbar"); // false
```
This is most useful when chaining with other validators such as `v::alnum()`
***
See also:
* [Alnum](Alnum.md)
* [Alpha](Alpha.md)
* [NotBlank](NotBlank.md)
* [NotEmpty](NotEmpty.md)
* [NotOptional](NotOptional.md)
* [Optional](Optional.md)