respect-validation/docs/Contains.md
Henrique Moody 2a2e1d577e
Change how documentation of rules are presented
Rules are not always used from the alias `v`, neither called staticaly.
2017-03-27 17:26:21 +02:00

496 B

Contains

  • Contains(mixed $value)
  • Contains(mixed $value, bool $identical)

For strings:

v::contains('ipsum')->validate('lorem ipsum'); // true

For arrays:

v::contains('ipsum')->validate(['ipsum', 'lorem']); // true

A second parameter may be passed for identical comparison instead of equal comparison.

Message template for this validator includes {{containsValue}}.


See also: