mirror of
https://github.com/Respect/Validation.git
synced 2026-03-17 07:45:45 +01:00
542 B
542 B
AllOf
v::allOf(v $v1, v $v2, v $v3...)
Will validate if all inner validators validates.
v::allOf(
v::int(),
v::positive()
)->validate(15); //true
This is similar to the chain (which is an allOf already), but its syntax allows you to set custom names for every node:
v::allOf(
v::int()->setName('Account Number'),
v::positive()->setName('Higher Than Zero')
)->setName('Positive integer')
->validate(15); //true
See also: