| 1 | <?php |
||
| 18 | class Regex |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * |
||
| 22 | * Validates the value against a regular expression. |
||
| 23 | * |
||
| 24 | * @param object $subject The subject to be filtered. |
||
| 25 | * |
||
| 26 | * @param string $field The subject field name. |
||
| 27 | * |
||
| 28 | * @param string $expr The regular expression to validate against. |
||
| 29 | * |
||
| 30 | * @return bool True if the value matches the expression, false if not. |
||
| 31 | * |
||
| 32 | */ |
||
| 33 | 12 | public function __invoke($subject, $field, $expr) |
|
| 41 | } |
||
| 42 |