1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/movim_ynh.git synced 2024-09-03 19:46:19 +02:00
movim_ynh/sources/vendor/respect/validation/docs/Not.md
2016-03-14 23:16:11 +01:00

427 B

Not

  • v::not(v $negatedValidator)

Negates any rule.

v::not(v::ip())->validate('foo'); // true

In the sample above, validator returns true because 'foo' isn't an IP Address.

You can negate complex, grouped or chained validators as well:

v::not(v::intVal()->positive())->validate(-1.5); // true

Each other validation has custom messages for negated rules.


See also: