respect-validation/docs/rules/NoWhitespace.md
Henrique Moody 4fd26e39bb
Rename "NotOptional" to "NotUndef"
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>
2024-05-06 20:45:27 +02:00

595 B

NoWhitespace

  • NoWhitespace()

Validates if a string contains no whitespace (spaces, tabs and line breaks);

v::noWhitespace()->validate('foo bar');  //false
v::noWhitespace()->validate("foo\nbar"); // false

This is most useful when chaining with other validators such as Alnum()

Categorization

  • Strings

Changelog

Version Description
0.3.9 Created

See also: