Equivalent
Equivalent(mixed $compareTo)
Validates if the input is equivalent to some value.
v::equivalent(1)->validate(true); // true
v::equivalent('Something')->validate('someThing'); // true
v::equivalent(new ArrayObject([1, 2, 3, 4, 5]))->validate(new ArrayObject([1, 2, 3, 4, 5])); // true
This rule is very similar to Equals but it does not make case-sensitive comparisons.
Message template for this validator includes {{compareTo}}
.
Categorization
- Comparisons
Changelog
Version | Description |
---|---|
2.0.0 | Created |
See also: