| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | public function boot() |
||
| 16 | { |
||
| 17 | // Add country validation rule |
||
| 18 | Validator::extend('country', function ($attribute, $value) { |
||
| 19 | return array_key_exists(mb_strtolower($value), countries()); |
||
| 20 | }, trans('validation.invalid_country')); |
||
| 21 | |||
| 22 | // Add currency validation rule |
||
| 23 | Validator::extend('currency', function ($attribute, $value) { |
||
| 24 | return array_key_exists($value, currencies()); |
||
| 25 | }, trans('validation.invalid_currency')); |
||
| 26 | } |
||
| 27 | } |
||
| 28 |