respect-validation/docs/validators/Equals.md
Henrique Moody 81310cc4d9
Rename namespace Rules to Validators
Since that namespace contains our “validators”, naming it as such makes
much more sense.
2026-01-05 17:36:35 +01:00

1.3 KiB

Equals

  • Equals(mixed $compareTo)

Validates if the input is equal to some value.

v::equals('alganet')->isValid('alganet'); // true

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

Templates

Equals::TEMPLATE_STANDARD

Mode Template
default {{subject}} must be equal to {{compareTo}}
inverted {{subject}} must not be equal to {{compareTo}}

Template placeholders

Placeholder Description
compareTo Value to be compared against the input.
subject The validated input or the custom validator name (if specified).

Categorization

  • Comparisons

Changelog

Version Description
1.0.0 Removed identical checking (see Identical)
0.3.9 Created

See also: