| 1 | <?php |
||
| 7 | class FieldsChecker extends AbstractChecker |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Default error messages associated with checker method by name. |
||
| 11 | * {@inheritdoc} |
||
| 12 | */ |
||
| 13 | const MESSAGES = [ |
||
| 14 | 'equalsTo' => '[[Values should match.]]', |
||
| 15 | ]; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Checks equality between given value and another field's value. |
||
| 19 | * |
||
| 20 | * @param string $value |
||
| 21 | * @param string $field |
||
| 22 | * |
||
| 23 | * @return bool |
||
| 24 | */ |
||
| 25 | public function equalsTo(string $value, string $field): bool |
||
| 29 | } |