mirror of
https://github.com/Respect/Validation.git
synced 2026-03-17 15:50:03 +01:00
The method has been renamed some time ago, but I haven't updated the documentation to cause less confusion. Now that I want to start updating the documentation, I switched the default branch on GitHub to the latest stable version, so I assume there will be less confusion in the documentation, and I can start updating the docs for the next version.
715 B
715 B
In
In(mixed $haystack)In(mixed $haystack, bool $identical)
Validates if the input is contained in a specific haystack.
For strings:
v::in('lorem ipsum')->isValid('ipsum'); // true
For arrays:
v::in(['lorem', 'ipsum'])->isValid('lorem'); // true
A second parameter may be passed for identical comparison instead of equal comparison.
Message template for this validator includes {{haystack}}.
Categorization
- Arrays
- Comparisons
- Strings
Changelog
| Version | Description |
|---|---|
| 0.3.9 | Created |
See also: