diff --git a/app/Rules/CountryCodeExists.php b/app/Rules/CountryCodeExists.php new file mode 100644 index 0000000..2672635 --- /dev/null +++ b/app/Rules/CountryCodeExists.php @@ -0,0 +1,28 @@ +first(); + + if ($country === null) { + $fail('validation.country_code_exists_in_db'); + } + } +}