| Total Complexity | 2 |
| Total Lines | 16 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class ValidIranPlate implements Rule |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Check License Plate Validator. |
||
| 11 | */ |
||
| 12 | public function passes($attribute, $value): bool |
||
| 13 | { |
||
| 14 | return preg_match("/^\d{2}\s?[آ-ی]\s?\d{3}\s?ایران\s?\d{2}$/u", $value); |
||
|
|
|||
| 15 | } |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Get the License Plate Validator error message. |
||
| 19 | */ |
||
| 20 | public function message(): string |
||
| 23 | } |
||
| 24 | } |
||
| 25 |