Skip to content

Latest commit

 

History

History
34 lines (23 loc) · 590 Bytes

AnyOf.md

File metadata and controls

34 lines (23 loc) · 590 Bytes

AnyOf

  • AnyOf(Validatable ...$rule)

This is a group validator that acts as an OR operator.

v::anyOf(v::intVal(), v::floatVal())->validate(15.5); // true

In the sample above, IntVal() doesn't validates, but FloatVal() validates, so AnyOf() returns true.

AnyOf() returns true if at least one inner validator passes.

Categorization

  • Composite
  • Nesting

Changelog

Version Description
2.0.0 Created

See also: