From 8deb58d63e8e793b25687e82ad425a17f0115ea7 Mon Sep 17 00:00:00 2001 From: Milwad <98118400+milwad-dev@users.noreply.github.com> Date: Tue, 18 Feb 2025 21:07:40 +0330 Subject: [PATCH 1/8] add country names to config --- config/laravel-validate.php | 163 ++++++++++++++++++++++++++++++++++++ 1 file changed, 163 insertions(+) diff --git a/config/laravel-validate.php b/config/laravel-validate.php index d0b6911..e6a40eb 100644 --- a/config/laravel-validate.php +++ b/config/laravel-validate.php @@ -49,4 +49,167 @@ * If you want to use rules like 'required|ValidPhone' in your validations, you can change it to true. */ 'using_container' => false, + + /* + * The list of country names. + * + * If any country name is missing from this list, you can add your country name to this array. + */ + 'countries' => [ + 'AF' => 'Afghanistan', + 'AL' => 'Albania', + 'DZ' => 'Algeria', + 'AS' => 'American Samoa', + 'AD' => 'Andorra', + 'AO' => 'Angola', + 'AG' => 'Antigua and Barbuda', + 'AR' => 'Argentina', + 'AM' => 'Armenia', + 'AU' => 'Australia', + 'AT' => 'Austria', + 'AZ' => 'Azerbaijan', + 'BS' => 'Bahamas', + 'BH' => 'Bahrain', + 'BD' => 'Bangladesh', + 'BB' => 'Barbados', + 'BY' => 'Belarus', + 'BE' => 'Belgium', + 'BZ' => 'Belize', + 'BJ' => 'Benin', + 'BT' => 'Bhutan', + 'BO' => 'Bolivia', + 'BA' => 'Bosnia and Herzegovina', + 'BW' => 'Botswana', + 'BR' => 'Brazil', + 'BN' => 'Brunei', + 'BG' => 'Bulgaria', + 'BF' => 'Burkina Faso', + 'BI' => 'Burundi', + 'KH' => 'Cambodia', + 'CM' => 'Cameroon', + 'CA' => 'Canada', + 'CV' => 'Cape Verde', + 'CF' => 'Central African Republic', + 'TD' => 'Chad', + 'CL' => 'Chile', + 'CN' => 'China', + 'CO' => 'Colombia', + 'KM' => 'Comoros', + 'CG' => 'Congo', + 'CR' => 'Costa Rica', + 'HR' => 'Croatia', + 'CU' => 'Cuba', + 'CY' => 'Cyprus', + 'CZ' => 'Czech Republic', + 'DK' => 'Denmark', + 'DJ' => 'Djibouti', + 'DM' => 'Dominica', + 'DO' => 'Dominican Republic', + 'EC' => 'Ecuador', + 'EG' => 'Egypt', + 'SV' => 'El Salvador', + 'GQ' => 'Equatorial Guinea', + 'ER' => 'Eritrea', + 'EE' => 'Estonia', + 'ET' => 'Ethiopia', + 'FJ' => 'Fiji', + 'FI' => 'Finland', + 'FR' => 'France', + 'GA' => 'Gabon', + 'GM' => 'Gambia', + 'GE' => 'Georgia', + 'DE' => 'Germany', + 'GH' => 'Ghana', + 'GR' => 'Greece', + 'GD' => 'Grenada', + 'GT' => 'Guatemala', + 'GN' => 'Guinea', + 'GY' => 'Guyana', + 'HT' => 'Haiti', + 'HN' => 'Honduras', + 'HU' => 'Hungary', + 'IS' => 'Iceland', + 'IN' => 'India', + 'ID' => 'Indonesia', + 'IR' => 'Iran', + 'IQ' => 'Iraq', + 'IE' => 'Ireland', + 'IL' => 'Israel', + 'IT' => 'Italy', + 'JM' => 'Jamaica', + 'JP' => 'Japan', + 'JO' => 'Jordan', + 'KZ' => 'Kazakhstan', + 'KE' => 'Kenya', + 'KR' => 'South Korea', + 'KW' => 'Kuwait', + 'KG' => 'Kyrgyzstan', + 'LA' => 'Laos', + 'LV' => 'Latvia', + 'LB' => 'Lebanon', + 'LY' => 'Libya', + 'LT' => 'Lithuania', + 'LU' => 'Luxembourg', + 'MG' => 'Madagascar', + 'MY' => 'Malaysia', + 'MV' => 'Maldives', + 'ML' => 'Mali', + 'MT' => 'Malta', + 'MX' => 'Mexico', + 'MD' => 'Moldova', + 'MC' => 'Monaco', + 'MN' => 'Mongolia', + 'ME' => 'Montenegro', + 'MA' => 'Morocco', + 'MZ' => 'Mozambique', + 'MM' => 'Myanmar', + 'NA' => 'Namibia', + 'NP' => 'Nepal', + 'NL' => 'Netherlands', + 'NZ' => 'New Zealand', + 'NI' => 'Nicaragua', + 'NE' => 'Niger', + 'NG' => 'Nigeria', + 'NO' => 'Norway', + 'OM' => 'Oman', + 'PK' => 'Pakistan', + 'PA' => 'Panama', + 'PY' => 'Paraguay', + 'PE' => 'Peru', + 'PH' => 'Philippines', + 'PL' => 'Poland', + 'PT' => 'Portugal', + 'QA' => 'Qatar', + 'RO' => 'Romania', + 'RU' => 'Russia', + 'SA' => 'Saudi Arabia', + 'SN' => 'Senegal', + 'RS' => 'Serbia', + 'SG' => 'Singapore', + 'SK' => 'Slovakia', + 'SI' => 'Slovenia', + 'ZA' => 'South Africa', + 'ES' => 'Spain', + 'LK' => 'Sri Lanka', + 'SE' => 'Sweden', + 'CH' => 'Switzerland', + 'SY' => 'Syria', + 'TW' => 'Taiwan', + 'TJ' => 'Tajikistan', + 'TH' => 'Thailand', + 'TN' => 'Tunisia', + 'TR' => 'Turkey', + 'TM' => 'Turkmenistan', + 'UA' => 'Ukraine', + 'AE' => 'United Arab Emirates', + 'GB' => 'United Kingdom', + 'US' => 'United States', + 'UY' => 'Uruguay', + 'UZ' => 'Uzbekistan', + 'VE' => 'Venezuela', + 'VN' => 'Vietnam', + 'YE' => 'Yemen', + 'ZM' => 'Zambia', + 'ZW' => 'Zimbabwe' + ], ]; From d44417abdb5e8415d3c796da5f446f848b9339e4 Mon Sep 17 00:00:00 2001 From: Milwad <98118400+milwad-dev@users.noreply.github.com> Date: Tue, 18 Feb 2025 21:09:43 +0330 Subject: [PATCH 2/8] Create ValidCountry.php --- src/Rules/ValidCountry.php | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/Rules/ValidCountry.php diff --git a/src/Rules/ValidCountry.php b/src/Rules/ValidCountry.php new file mode 100644 index 0000000..2b3712a --- /dev/null +++ b/src/Rules/ValidCountry.php @@ -0,0 +1,35 @@ +validByKey) { + return array_key_exists($value, $countries); + } + + return in_array($value, $countries); + } + + /** + * Get the validation error message. + */ + public function message(): string + { + return __('validate.country'); + } +} From 880c9d1f0837e158add2b724b2b719519d27d6e4 Mon Sep 17 00:00:00 2001 From: Milwad <98118400+milwad-dev@users.noreply.github.com> Date: Tue, 18 Feb 2025 21:12:43 +0330 Subject: [PATCH 3/8] add `country` key to langs --- src/lang/It/validate.php | 1 + src/lang/ar/validate.php | 1 + src/lang/az/validate.php | 1 + src/lang/bn/validate.php | 1 + src/lang/ca/validate.php | 1 + src/lang/de/validate.php | 1 + src/lang/el/validate.php | 1 + src/lang/en/validate.php | 1 + src/lang/es/validate.php | 1 + src/lang/fa/validate.php | 1 + src/lang/fr/validate.php | 1 + src/lang/hi/validate.php | 1 + src/lang/id/validate.php | 1 + src/lang/ja/validate.php | 1 + src/lang/ko/validate.php | 1 + src/lang/ku_so/validate.php | 1 + src/lang/mk/validate.php | 1 + src/lang/pt_BR/validate.php | 1 + src/lang/ru/validate.php | 1 + src/lang/si/validate.php | 1 + src/lang/sv/validate.php | 1 + src/lang/tr/validate.php | 1 + src/lang/uk/validate.php | 1 + src/lang/zh_CN/validate.php | 1 + 24 files changed, 24 insertions(+) diff --git a/src/lang/It/validate.php b/src/lang/It/validate.php index 2c4f6af..91834f1 100644 --- a/src/lang/It/validate.php +++ b/src/lang/It/validate.php @@ -8,6 +8,7 @@ 'car-number' => ':attribute non è valido.', 'cart-number-iran' => ':attribute non è valido.', 'credit-card' => ':attribute non è valido.', + 'country' => ':attribute non è valido.', 'discord-username' => ':attribute non è valido.', 'domain' => ':attribute non è valido.', 'duplicate' => ':attribute non è valido.', diff --git a/src/lang/ar/validate.php b/src/lang/ar/validate.php index aa21380..94c049e 100644 --- a/src/lang/ar/validate.php +++ b/src/lang/ar/validate.php @@ -8,6 +8,7 @@ 'car-number' => ':attribute غير صالح.', 'cart-number-iran' => ':attribute غير صالح.', 'credit-card' => ':attribute غير صالح.', + 'country' => ':attribute غير صالح.', 'discord-username' => ':attribute غير صالح.', 'domain' => ':attribute غير صالح.', 'duplicate' => ':attribute غير صالح.', diff --git a/src/lang/az/validate.php b/src/lang/az/validate.php index 496a640..bde515e 100644 --- a/src/lang/az/validate.php +++ b/src/lang/az/validate.php @@ -8,6 +8,7 @@ 'car-number' => ':attribute doğru deyil.', 'cart-number-iran' => ':attribute doğru deyil.', 'credit-card' => ':attribute doğru deyil.', + 'country' => ':attribute doğru deyil.', 'discord-username' => ':attribute doğru deyil.', 'domain' => ':attribute doğru deyil.', 'duplicate' => ':attribute doğru deyil.', diff --git a/src/lang/bn/validate.php b/src/lang/bn/validate.php index 420479f..d64a87a 100644 --- a/src/lang/bn/validate.php +++ b/src/lang/bn/validate.php @@ -8,6 +8,7 @@ 'car-number' => ':attribute বৈধ নয়.', 'cart-number-iran' => ':attribute বৈধ নয়.', 'credit-card' => ':attribute বৈধ নয়.', + 'country' => ':attribute বৈধ নয়.', 'discord-username' => ':attribute বৈধ নয়.', 'domain' => ':attribute বৈধ নয়.', 'duplicate' => ':attribute বৈধ নয়.', diff --git a/src/lang/ca/validate.php b/src/lang/ca/validate.php index 0f8dc8e..060128e 100644 --- a/src/lang/ca/validate.php +++ b/src/lang/ca/validate.php @@ -8,6 +8,7 @@ 'car-number' => ':attribute no és vàlid.', 'cart-number-iran' => ':attribute no és vàlid.', 'credit-card' => ':attribute no és vàlid.', + 'country' => ':attribute no és vàlid.', 'discord-username' => ':attribute no és vàlid.', 'domain' => ':attribute no és vàlid.', 'duplicate' => ':attribute no és vàlid.', diff --git a/src/lang/de/validate.php b/src/lang/de/validate.php index 345b5e8..e81b4ca 100644 --- a/src/lang/de/validate.php +++ b/src/lang/de/validate.php @@ -8,6 +8,7 @@ 'car-number' => ':attribute kein gültiger.', 'cart-number-iran' => ':attribute kein gültiger.', 'credit-card' => ':attribute kein gültiger.', + 'country' => ':attribute kein gültiger.', 'discord-username' => ':attribute kein gültiger.', 'domain' => ':attribute kein gültiger.', 'duplicate' => ':attribute kein gültiger.', diff --git a/src/lang/el/validate.php b/src/lang/el/validate.php index df74b16..e08af29 100644 --- a/src/lang/el/validate.php +++ b/src/lang/el/validate.php @@ -8,6 +8,7 @@ 'car-number' => 'Το :attribute δεν είναι έγκυρο.', 'cart-number-iran' => 'Το :attribute δεν είναι έγκυρο.', 'credit-card' => 'Το :attribute δεν είναι έγκυρο.', + 'country' => 'Το :attribute δεν είναι έγκυρο.', 'discord-username' => 'Το :attribute δεν είναι έγκυρο.', 'domain' => 'Το :attribute δεν είναι έγκυρο.', 'duplicate' => 'Το :attribute δεν είναι έγκυρο.', diff --git a/src/lang/en/validate.php b/src/lang/en/validate.php index b24511f..6a4529f 100644 --- a/src/lang/en/validate.php +++ b/src/lang/en/validate.php @@ -8,6 +8,7 @@ 'car-number' => 'The :attribute is not valid.', 'cart-number-iran' => 'The :attribute is not valid.', 'credit-card' => 'The :attribute is not valid.', + 'country' => 'The :attribute is not valid.', 'discord-username' => 'The :attribute is not valid.', 'domain' => 'The :attribute is not valid.', 'duplicate' => 'The :attribute is not valid.', diff --git a/src/lang/es/validate.php b/src/lang/es/validate.php index 2d7f17c..c886be9 100644 --- a/src/lang/es/validate.php +++ b/src/lang/es/validate.php @@ -8,6 +8,7 @@ 'car-number' => ':attribute no es válido.', 'cart-number-iran' => ':attribute no es válido.', 'credit-card' => ':attribute no es válido.', + 'country' => ':attribute no es válido.', 'discord-username' => ':attribute no es válido.', 'domain' => ':attribute no es válido.', 'duplicate' => ':attribute no es válido.', diff --git a/src/lang/fa/validate.php b/src/lang/fa/validate.php index 557dfce..58a8510 100644 --- a/src/lang/fa/validate.php +++ b/src/lang/fa/validate.php @@ -8,6 +8,7 @@ 'car-number' => 'مقدار :attribute صحیح نمی باشد.', 'cart-number-iran' => 'مقدار :attribute صحیح نمی باشد.', 'credit-card' => 'مقدار :attribute صحیح نمی باشد.', + 'country' => 'مقدار :attribute صحیح نمی باشد.', 'discord-username' => 'مقدار :attribute صحیح نمی باشد.', 'domain' => 'مقدار :attribute صحیح نمی باشد.', 'duplicate' => 'مقدار :attribute صحیح نمی باشد.', diff --git a/src/lang/fr/validate.php b/src/lang/fr/validate.php index 6df5a29..3a61819 100644 --- a/src/lang/fr/validate.php +++ b/src/lang/fr/validate.php @@ -8,6 +8,7 @@ 'car-number' => ":attribute n'est pas valide.", 'cart-number-iran' => ":attribute n'est pas valide.", 'credit-card' => ":attribute n'est pas valide.", + 'country' => ":attribute n'est pas valide.", 'discord-username' => ":attribute n'est pas valide.", 'domain' => ":attribute n'est pas valide.", 'duplicate' => ":attribute n'est pas valide.", diff --git a/src/lang/hi/validate.php b/src/lang/hi/validate.php index 8bdd3fb..db49f15 100644 --- a/src/lang/hi/validate.php +++ b/src/lang/hi/validate.php @@ -8,6 +8,7 @@ 'car-number' => ':attributeमान्य नहीं है।.', 'cart-number-iran' => ':attributeमान्य नहीं है।.', 'credit-card' => ':attributeमान्य नहीं है।.', + 'country' => ':attributeमान्य नहीं है।.', 'discord-username' => ':attributeमान्य नहीं है।.', 'domain' => ':attributeमान्य नहीं है।.', 'duplicate' => ':attributeमान्य नहीं है।.', diff --git a/src/lang/id/validate.php b/src/lang/id/validate.php index 169d0bb..27de97e 100644 --- a/src/lang/id/validate.php +++ b/src/lang/id/validate.php @@ -8,6 +8,7 @@ 'car-number' => ':Attribute tidak valid.', 'cart-number-iran' => ':Attribute tidak valid.', 'credit-card' => ':Attribute tidak valid.', + 'country' => ':Attribute tidak valid.', 'discord-username' => ':Attribute tidak valid.', 'domain' => ':Attribute tidak valid.', 'duplicate' => ':Attribute tidak valid.', diff --git a/src/lang/ja/validate.php b/src/lang/ja/validate.php index 5fbc3b8..4bbb1f0 100644 --- a/src/lang/ja/validate.php +++ b/src/lang/ja/validate.php @@ -8,6 +8,7 @@ 'car-number' => ':attribute有効じゃない。', 'cart-number-iran' => ':attribute有効じゃない。', 'credit-card' => ':attribute有効じゃない。', + 'country' => ':attribute有効じゃない。', 'discord-username' => ':attribute有効じゃない。', 'domain' => ':attribute有効じゃない。', 'duplicate' => ':attribute有効じゃない。', diff --git a/src/lang/ko/validate.php b/src/lang/ko/validate.php index e0f2c63..d7587e0 100644 --- a/src/lang/ko/validate.php +++ b/src/lang/ko/validate.php @@ -8,6 +8,7 @@ 'car-number' => ':attribute유효하지 않습니다.', 'cart-number-iran' => ':attribute유효하지 않습니다.', 'credit-card' => ':attribute유효하지 않습니다.', + 'country' => ':attribute유효하지 않습니다.', 'discord-username' => ':attribute유효하지 않습니다.', 'domain' => ':attribute유효하지 않습니다.', 'duplicate' => ':attribute유효하지 않습니다.', diff --git a/src/lang/ku_so/validate.php b/src/lang/ku_so/validate.php index f6e5294..47aa011 100644 --- a/src/lang/ku_so/validate.php +++ b/src/lang/ku_so/validate.php @@ -8,6 +8,7 @@ 'car-number' => 'ئەو :attribute هەڵبژێردراوە نادروستە.', 'cart-number-iran' => 'ئەو :attribute هەڵبژێردراوە نادروستە.', 'credit-card' => 'ئەو :attribute هەڵبژێردراوە نادروستە.', + 'country' => 'ئەو :attribute هەڵبژێردراوە نادروستە.', 'discord-username' => 'ئەو :attribute هەڵبژێردراوە نادروستە.', 'domain' => 'ئەو :attribute هەڵبژێردراوە نادروستە.', 'duplicate' => 'ئەو :attribute هەڵبژێردراوە نادروستە.', diff --git a/src/lang/mk/validate.php b/src/lang/mk/validate.php index eec2f81..d84382b 100644 --- a/src/lang/mk/validate.php +++ b/src/lang/mk/validate.php @@ -8,6 +8,7 @@ 'car-number' => 'Невалидна вредност :attribute', 'cart-number-iran' => 'Невалидна вредност :attribute', 'credit-card' => 'Невалидна вредност :attribute', + 'country' => 'Невалидна вредност :attribute', 'discord-username' => 'Невалидна вредност :attribute', 'domain' => 'Невалидна вредност :attribute', 'duplicate' => 'Невалидна вредност :attribute', diff --git a/src/lang/pt_BR/validate.php b/src/lang/pt_BR/validate.php index 1e5878e..2a43dfc 100644 --- a/src/lang/pt_BR/validate.php +++ b/src/lang/pt_BR/validate.php @@ -8,6 +8,7 @@ 'car-number' => 'O :attribute não é válido.', 'cart-number-iran' => 'O :attribute não é válido.', 'credit-card' => 'O :attribute não é válido.', + 'country' => 'O :attribute não é válido.', 'discord-username' => 'O :attribute não é válido.', 'domain' => 'O :attribute não é válido.', 'duplicate' => 'O :attribute não é válido.', diff --git a/src/lang/ru/validate.php b/src/lang/ru/validate.php index e7b1862..229574e 100644 --- a/src/lang/ru/validate.php +++ b/src/lang/ru/validate.php @@ -8,6 +8,7 @@ 'car-number' => ':attribute не действует.', 'cart-number-iran' => ':attribute не действует.', 'credit-card' => ':attribute не действует.', + 'country' => ':attribute не действует.', 'discord-username' => ':attribute не действует.', 'domain' => ':attribute не действует.', 'duplicate' => ':attribute не действует.', diff --git a/src/lang/si/validate.php b/src/lang/si/validate.php index e59ce6a..75d3697 100644 --- a/src/lang/si/validate.php +++ b/src/lang/si/validate.php @@ -8,6 +8,7 @@ 'car-number' => ':attribute වලංගු නොවේ.', 'cart-number-iran' => ':attribute වලංගු නොවේ.', 'credit-card' => ':attribute වලංගු නොවේ.', + 'country' => ':attribute වලංගු නොවේ.', 'discord-username' => ':attribute වලංගු නොවේ.', 'domain' => ':attribute වලංගු නොවේ.', 'duplicate' => ':attribute වලංගු නොවේ.', diff --git a/src/lang/sv/validate.php b/src/lang/sv/validate.php index 32864cf..766c001 100644 --- a/src/lang/sv/validate.php +++ b/src/lang/sv/validate.php @@ -8,6 +8,7 @@ 'car-number' => 'Värdet :attribute är inte korrekt.', 'cart-number-iran' => 'Värdet :attribute är inte korrekt.', 'credit-card' => 'Värdet :attribute är inte korrekt.', + 'country' => 'Värdet :attribute är inte korrekt.', 'discord-username' => 'Värdet :attribute är inte korrekt.', 'domain' => 'Värdet :attribute är inte korrekt.', 'duplicate' => 'Värdet :attribute är inte korrekt.', diff --git a/src/lang/tr/validate.php b/src/lang/tr/validate.php index ad50c19..17a05e8 100644 --- a/src/lang/tr/validate.php +++ b/src/lang/tr/validate.php @@ -8,6 +8,7 @@ 'car-number' => ':attribute doğru değil.', 'cart-number-iran' => ':attribute doğru değil.', 'credit-card' => ':attribute doğru değil.', + 'country' => ':attribute doğru değil.', 'discord-username' => ':attribute doğru değil.', 'domain' => ':attribute doğru değil.', 'duplicate' => ':attribute doğru değil.', diff --git a/src/lang/uk/validate.php b/src/lang/uk/validate.php index e16ef27..2e74167 100644 --- a/src/lang/uk/validate.php +++ b/src/lang/uk/validate.php @@ -8,6 +8,7 @@ 'car-number' => ':attribute не є дійсним.', 'cart-number-iran' => ':attribute не є дійсним.', 'credit-card' => ':attribute не є дійсним.', + 'country' => ':attribute не є дійсним.', 'discord-username' => ':attribute не є дійсним.', 'domain' => ':attribute не є дійсним.', 'duplicate' => ':attribute не є дійсним.', diff --git a/src/lang/zh_CN/validate.php b/src/lang/zh_CN/validate.php index c40d1c2..ec07e29 100644 --- a/src/lang/zh_CN/validate.php +++ b/src/lang/zh_CN/validate.php @@ -8,6 +8,7 @@ 'car-number' => ':attribute无效.', 'cart-number-iran' => ':attribute无效.', 'credit-card' => ':attribute无效.', + 'country' => ':attribute无效.', 'discord-username' => ':attribute无效.', 'domain' => ':attribute无效.', 'duplicate' => ':attribute无效.', From a0afb2d55672347633024d833175033bdf79bb1c Mon Sep 17 00:00:00 2001 From: Milwad <98118400+milwad-dev@users.noreply.github.com> Date: Tue, 18 Feb 2025 21:19:20 +0330 Subject: [PATCH 4/8] Update laravel-validate.php --- config/laravel-validate.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/laravel-validate.php b/config/laravel-validate.php index e6a40eb..4c3bb6b 100644 --- a/config/laravel-validate.php +++ b/config/laravel-validate.php @@ -210,6 +210,6 @@ 'VN' => 'Vietnam', 'YE' => 'Yemen', 'ZM' => 'Zambia', - 'ZW' => 'Zimbabwe' + 'ZW' => 'Zimbabwe', ], ]; From 7d759c8223d21e1cdb18f87d86bde65a376bdea5 Mon Sep 17 00:00:00 2001 From: Milwad <98118400+milwad-dev@users.noreply.github.com> Date: Tue, 18 Feb 2025 21:19:21 +0330 Subject: [PATCH 5/8] Create ValidCountryTest.php --- tests/Rules/ValidCountryTest.php | 49 ++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 tests/Rules/ValidCountryTest.php diff --git a/tests/Rules/ValidCountryTest.php b/tests/Rules/ValidCountryTest.php new file mode 100644 index 0000000..dcd9b78 --- /dev/null +++ b/tests/Rules/ValidCountryTest.php @@ -0,0 +1,49 @@ + [new ValidCountry]]; + + foreach (config('laravel-validate.countries', []) as $country) { + $data = ['country' => $country]; + $passes = $this->app['validator']->make($data, $rules)->passes(); + $this->assertTrue($passes); + } + } + + /** + * Test country is valid by keys. + */ + public function test_country_is_valid_by_keys() + { + $rules = ['country' => [new ValidCountry(true)]]; + + foreach (array_keys(config('laravel-validate.countries', [])) as $country) { + $data = ['country' => $country]; + $passes = $this->app['validator']->make($data, $rules)->passes(); + $this->assertTrue($passes); + } + } + + /** + * Test country is not valid. + */ + public function test_country_is_not_valid() + { + $rules = ['country' => [new ValidCountry]]; + $data = ['country' => 'Unknown']; + $passes = $this->app['validator']->make($data, $rules)->passes(); + + $this->assertFalse($passes); + } +} From 5908f2b8322c5d55399447ae1bd7ffb2ab72efd0 Mon Sep 17 00:00:00 2001 From: Milwad <98118400+milwad-dev@users.noreply.github.com> Date: Tue, 18 Feb 2025 21:23:02 +0330 Subject: [PATCH 6/8] Create valid-country.md --- docs/1.x/valid-country.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 docs/1.x/valid-country.md diff --git a/docs/1.x/valid-country.md b/docs/1.x/valid-country.md new file mode 100644 index 0000000..99df549 --- /dev/null +++ b/docs/1.x/valid-country.md @@ -0,0 +1,34 @@ +## ValidCountry + +If you want to validate the country name, you can use the `ValidCountry` rule: + +```php +use Milwad\LaravelValidate\Rules\ValidCountry; + +return [ + 'country' => ['required', new ValidCountry()], // country => United Arab Emirates +]; +``` + +Also, you can validate country name by key like "AE": + +```php +use Milwad\LaravelValidate\Rules\ValidCountry; + +return [ + 'country' => ['required', new ValidCountry(validByKey: true)], // country => "AE" +]; +``` + +For see the list of country name, you can open `config/laravel-validate.php`, and go to `countries` key: + +```php +/* + * The list of country names. + * + * If any country name is missing from this list, you can add your country name to this array. + */ +'countries' => [...], +``` + +> If any country name is missing from this list, you can add your country name to this array. From 527f234cfc9b38bc9a0b73cb04685e9096126cda Mon Sep 17 00:00:00 2001 From: Milwad <98118400+milwad-dev@users.noreply.github.com> Date: Tue, 18 Feb 2025 21:25:26 +0330 Subject: [PATCH 7/8] Update README.md --- README.md | 67 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 34 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index f8d2cfd..be71666 100644 --- a/README.md +++ b/README.md @@ -100,39 +100,40 @@ return [ | 4 | [ValidCapitalCharWithNumber](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-capital-char-with-number.md) | Validate String for ex (MILWAD-84) | | 5 | [ValidCarNumber](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-car-number.md) | Validate car number for ex (KA01AB1234) | | 6 | [ValidCartNumberIran](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-cart-number-iran.md) | Validate cart number for ex (1234123412341234) | -| 7 | [ValidCreditCard](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-credit-card.md) | Validate credit card for ex (4111111111111111) | -| 8 | [ValidDiscordUsername](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-discord-username.md) | Validate username discord for ex (Milwad#2134) | -| 9 | [ValidDomain](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-domain.md) | Validate domain name for ex (github.com) | -| 10 | [ValidDuplicate](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-duplicate.md) | Validate duplicate string, numbers for ex (1123456) | -| 11 | [ValidDuplicateCharacter](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-duplicate-character.md) | Validate duplicate characters for ex (1,2,3,4,5,6,7,8,9) | -| 12 | [ValidEvenNumber](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-even-number.md) | Validate number is even for ex (1024) | -| 13 | [ValidHashtag](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-hashtag.md) | Validate hashtag for ex (#milwad) | -| 14 | [ValidHexColor](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-hex-color.md) | Validate hex color for ex (#fcba03) | -| 15 | [ValidHtmlTag](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-html-tag.md) | Validate html tags for ex (`
`) | -| 16 | [ValidIban](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-iban.md) | Validate IBAN ex (IR062960000000100324200001) | -| 17 | [ValidImei](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-imei.md) | Validate imei phone for ex (354809104295874) | -| 18 | [ValidIpAddressIPV4](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-ip-address-ipv4.md) | Validate ip address IPV4 for ex (129.144.50.56) | -| 19 | [ValidIpAddressIPV6](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-ip-address-ipv6.md) | Validate ip address IPV6 for ex (2001:db8:3333:4444:5555:6666:7777:8888) | -| 20 | [ValidIranPostalCode](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-iran-postal-code.md) | Validate Iran postal code ex (3354355599) | -| 21 | [ValidJalaliDate](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-jalali-date.md) | Validate jalali date for ex (1384/8/25) | -| 22 | [ValidJwt](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-jwt.md) | Validate jwt for ex (eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjEyMzQ1Njc4OTAiLCJuYW1lIjoiSm9obiBEb2UiLCJhZG1pbiI6dHJ1ZSwiZXhwIjoxNTgyNjE2MDA1fQ.umEYVDP_kZJGCI3tkU9dmq7CIumEU8Zvftc-klp-334) | -| 23 | [ValidKebabCase](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-kebab-case.md) | Validate kebab case for ex (milwad-dev) | -| 24 | [ValidNameDaysWeek](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-name-days-week.md) | Validate day week for ex (monday) | -| 25 | [ValidNationalCard](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-national-card.md) | Validate national card for ex (015016437) | -| 26 | [ValidOddNumber](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-odd-number.md) | Validate number is odd for ex (4321) | -| 27 | [ValidPascalCase](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-pascal-case.md) | Validate pascal case for ex (MilwadDev) | -| 28 | [ValidPattern](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-pattern.md) | Validate texts with specific pattern 🔥 for ex (4444-4444-4444) | -| 29 | [ValidPhoneNumber](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-phone-number.md) | Validate phone number for ex (09366000000) | -| 30 | [ValidPort](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-port.md) | Validate port value for ex (8080) | -| 31 | [ValidSlashEndOfString](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-slash-end-of-string.md) | Validate write slash at the string for ex (milwad/) | -| 32 | [ValidSlug](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-slug.md) | Validate slug for ex (milwad-dev) | -| 33 | [ValidSnakeCase](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-snake-case.md) | Validate snake case for ex (milwad_dev) | -| 34 | [ValidStrongPassword](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-strong-password.md) | Validate password for ex (Milwad123!) | -| 35 | [ValidUlid](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-ulid.md) | Validate ulid for ex (01ARZ3NDEKTSV4RRFFQ69G5FAV) | -| 36 | [ValidUrl](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-url.md) | Validate url for ex (https://www.google.com) | -| 37 | [ValidUsername](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-username.md) | Validate username for ex (milwad) | -| 38 | [ValidUuid](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-uuid.md) | Validate uuid for ex (123e4567-e89b-12d3-a456-426655440000) | -| 39 | [ValidVatId](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-vatid.md) | Validate european VAT ID ex (EL123456789123) | +| 7 | [ValidCountry](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-country.md) | Validate country name for ex (United Arab Emirates) | +| 8 | [ValidCreditCard](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-credit-card.md) | Validate credit card for ex (4111111111111111) | +| 9 | [ValidDiscordUsername](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-discord-username.md) | Validate username discord for ex (Milwad#2134) | +| 10 | [ValidDomain](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-domain.md) | Validate domain name for ex (github.com) | +| 11 | [ValidDuplicate](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-duplicate.md) | Validate duplicate string, numbers for ex (1123456) | +| 12 | [ValidDuplicateCharacter](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-duplicate-character.md) | Validate duplicate characters for ex (1,2,3,4,5,6,7,8,9) | +| 13 | [ValidEvenNumber](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-even-number.md) | Validate number is even for ex (1024) | +| 14 | [ValidHashtag](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-hashtag.md) | Validate hashtag for ex (#milwad) | +| 15 | [ValidHexColor](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-hex-color.md) | Validate hex color for ex (#fcba03) | +| 16 | [ValidHtmlTag](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-html-tag.md) | Validate html tags for ex (``) | +| 17 | [ValidIban](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-iban.md) | Validate IBAN ex (IR062960000000100324200001) | +| 18 | [ValidImei](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-imei.md) | Validate imei phone for ex (354809104295874) | +| 19 | [ValidIpAddressIPV4](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-ip-address-ipv4.md) | Validate ip address IPV4 for ex (129.144.50.56) | +| 20 | [ValidIpAddressIPV6](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-ip-address-ipv6.md) | Validate ip address IPV6 for ex (2001:db8:3333:4444:5555:6666:7777:8888) | +| 21 | [ValidIranPostalCode](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-iran-postal-code.md) | Validate Iran postal code ex (3354355599) | +| 22 | [ValidJalaliDate](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-jalali-date.md) | Validate jalali date for ex (1384/8/25) | +| 23 | [ValidJwt](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-jwt.md) | Validate jwt for ex (eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjEyMzQ1Njc4OTAiLCJuYW1lIjoiSm9obiBEb2UiLCJhZG1pbiI6dHJ1ZSwiZXhwIjoxNTgyNjE2MDA1fQ.umEYVDP_kZJGCI3tkU9dmq7CIumEU8Zvftc-klp-334) | +| 24 | [ValidKebabCase](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-kebab-case.md) | Validate kebab case for ex (milwad-dev) | +| 25 | [ValidNameDaysWeek](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-name-days-week.md) | Validate day week for ex (monday) | +| 26 | [ValidNationalCard](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-national-card.md) | Validate national card for ex (015016437) | +| 27 | [ValidOddNumber](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-odd-number.md) | Validate number is odd for ex (4321) | +| 28 | [ValidPascalCase](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-pascal-case.md) | Validate pascal case for ex (MilwadDev) | +| 29 | [ValidPattern](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-pattern.md) | Validate texts with specific pattern 🔥 for ex (4444-4444-4444) | +| 30 | [ValidPhoneNumber](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-phone-number.md) | Validate phone number for ex (09366000000) | +| 31 | [ValidPort](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-port.md) | Validate port value for ex (8080) | +| 32 | [ValidSlashEndOfString](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-slash-end-of-string.md) | Validate write slash at the string for ex (milwad/) | +| 33 | [ValidSlug](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-slug.md) | Validate slug for ex (milwad-dev) | +| 34 | [ValidSnakeCase](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-snake-case.md) | Validate snake case for ex (milwad_dev) | +| 35 | [ValidStrongPassword](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-strong-password.md) | Validate password for ex (Milwad123!) | +| 36 | [ValidUlid](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-ulid.md) | Validate ulid for ex (01ARZ3NDEKTSV4RRFFQ69G5FAV) | +| 37 | [ValidUrl](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-url.md) | Validate url for ex (https://www.google.com) | +| 38 | [ValidUsername](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-username.md) | Validate username for ex (milwad) | +| 39 | [ValidUuid](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-uuid.md) | Validate uuid for ex (123e4567-e89b-12d3-a456-426655440000) | +| 40 | [ValidVatId](https://github.com/milwad-dev/laravel-validate/blob/1.x/docs/1.x/valid-vatid.md) | Validate european VAT ID ex (EL123456789123) | From 7a28e6745c56799e98a3e140533130a9ef65fc62 Mon Sep 17 00:00:00 2001 From: Milwad <98118400+milwad-dev@users.noreply.github.com> Date: Tue, 18 Feb 2025 21:26:57 +0330 Subject: [PATCH 8/8] wip --- src/lang/It/validate.php | 2 +- src/lang/ar/validate.php | 2 +- src/lang/az/validate.php | 2 +- src/lang/bn/validate.php | 2 +- src/lang/ca/validate.php | 2 +- src/lang/de/validate.php | 2 +- src/lang/el/validate.php | 2 +- src/lang/en/validate.php | 2 +- src/lang/es/validate.php | 2 +- src/lang/fa/validate.php | 2 +- src/lang/fr/validate.php | 2 +- src/lang/hi/validate.php | 2 +- src/lang/id/validate.php | 2 +- src/lang/ja/validate.php | 2 +- src/lang/ko/validate.php | 2 +- src/lang/ku_so/validate.php | 2 +- src/lang/mk/validate.php | 2 +- src/lang/pt_BR/validate.php | 2 +- src/lang/ru/validate.php | 2 +- src/lang/si/validate.php | 2 +- src/lang/sv/validate.php | 2 +- src/lang/tr/validate.php | 2 +- src/lang/uk/validate.php | 2 +- src/lang/zh_CN/validate.php | 2 +- 24 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/lang/It/validate.php b/src/lang/It/validate.php index 91834f1..70bde03 100644 --- a/src/lang/It/validate.php +++ b/src/lang/It/validate.php @@ -7,8 +7,8 @@ 'capital-char-with-number' => ':attribute non è valido.', 'car-number' => ':attribute non è valido.', 'cart-number-iran' => ':attribute non è valido.', - 'credit-card' => ':attribute non è valido.', 'country' => ':attribute non è valido.', + 'credit-card' => ':attribute non è valido.', 'discord-username' => ':attribute non è valido.', 'domain' => ':attribute non è valido.', 'duplicate' => ':attribute non è valido.', diff --git a/src/lang/ar/validate.php b/src/lang/ar/validate.php index 94c049e..cc14c54 100644 --- a/src/lang/ar/validate.php +++ b/src/lang/ar/validate.php @@ -7,8 +7,8 @@ 'capital-char-with-number' => ':attribute غير صالح.', 'car-number' => ':attribute غير صالح.', 'cart-number-iran' => ':attribute غير صالح.', - 'credit-card' => ':attribute غير صالح.', 'country' => ':attribute غير صالح.', + 'credit-card' => ':attribute غير صالح.', 'discord-username' => ':attribute غير صالح.', 'domain' => ':attribute غير صالح.', 'duplicate' => ':attribute غير صالح.', diff --git a/src/lang/az/validate.php b/src/lang/az/validate.php index bde515e..10e9f73 100644 --- a/src/lang/az/validate.php +++ b/src/lang/az/validate.php @@ -7,8 +7,8 @@ 'capital-char-with-number' => ':attribute doğru deyil.', 'car-number' => ':attribute doğru deyil.', 'cart-number-iran' => ':attribute doğru deyil.', - 'credit-card' => ':attribute doğru deyil.', 'country' => ':attribute doğru deyil.', + 'credit-card' => ':attribute doğru deyil.', 'discord-username' => ':attribute doğru deyil.', 'domain' => ':attribute doğru deyil.', 'duplicate' => ':attribute doğru deyil.', diff --git a/src/lang/bn/validate.php b/src/lang/bn/validate.php index d64a87a..b198a3e 100644 --- a/src/lang/bn/validate.php +++ b/src/lang/bn/validate.php @@ -7,8 +7,8 @@ 'capital-char-with-number' => ':attribute বৈধ নয়.', 'car-number' => ':attribute বৈধ নয়.', 'cart-number-iran' => ':attribute বৈধ নয়.', - 'credit-card' => ':attribute বৈধ নয়.', 'country' => ':attribute বৈধ নয়.', + 'credit-card' => ':attribute বৈধ নয়.', 'discord-username' => ':attribute বৈধ নয়.', 'domain' => ':attribute বৈধ নয়.', 'duplicate' => ':attribute বৈধ নয়.', diff --git a/src/lang/ca/validate.php b/src/lang/ca/validate.php index 060128e..95f7969 100644 --- a/src/lang/ca/validate.php +++ b/src/lang/ca/validate.php @@ -7,8 +7,8 @@ 'capital-char-with-number' => ':attribute no és vàlid.', 'car-number' => ':attribute no és vàlid.', 'cart-number-iran' => ':attribute no és vàlid.', - 'credit-card' => ':attribute no és vàlid.', 'country' => ':attribute no és vàlid.', + 'credit-card' => ':attribute no és vàlid.', 'discord-username' => ':attribute no és vàlid.', 'domain' => ':attribute no és vàlid.', 'duplicate' => ':attribute no és vàlid.', diff --git a/src/lang/de/validate.php b/src/lang/de/validate.php index e81b4ca..59bc605 100644 --- a/src/lang/de/validate.php +++ b/src/lang/de/validate.php @@ -7,8 +7,8 @@ 'capital-char-with-number' => ':attribute kein gültiger.', 'car-number' => ':attribute kein gültiger.', 'cart-number-iran' => ':attribute kein gültiger.', - 'credit-card' => ':attribute kein gültiger.', 'country' => ':attribute kein gültiger.', + 'credit-card' => ':attribute kein gültiger.', 'discord-username' => ':attribute kein gültiger.', 'domain' => ':attribute kein gültiger.', 'duplicate' => ':attribute kein gültiger.', diff --git a/src/lang/el/validate.php b/src/lang/el/validate.php index e08af29..0c59ac0 100644 --- a/src/lang/el/validate.php +++ b/src/lang/el/validate.php @@ -7,8 +7,8 @@ 'capital-char-with-number' => 'Το :attribute δεν είναι έγκυρο.', 'car-number' => 'Το :attribute δεν είναι έγκυρο.', 'cart-number-iran' => 'Το :attribute δεν είναι έγκυρο.', - 'credit-card' => 'Το :attribute δεν είναι έγκυρο.', 'country' => 'Το :attribute δεν είναι έγκυρο.', + 'credit-card' => 'Το :attribute δεν είναι έγκυρο.', 'discord-username' => 'Το :attribute δεν είναι έγκυρο.', 'domain' => 'Το :attribute δεν είναι έγκυρο.', 'duplicate' => 'Το :attribute δεν είναι έγκυρο.', diff --git a/src/lang/en/validate.php b/src/lang/en/validate.php index 6a4529f..907315c 100644 --- a/src/lang/en/validate.php +++ b/src/lang/en/validate.php @@ -7,8 +7,8 @@ 'capital-char-with-number' => 'The :attribute is not valid.', 'car-number' => 'The :attribute is not valid.', 'cart-number-iran' => 'The :attribute is not valid.', - 'credit-card' => 'The :attribute is not valid.', 'country' => 'The :attribute is not valid.', + 'credit-card' => 'The :attribute is not valid.', 'discord-username' => 'The :attribute is not valid.', 'domain' => 'The :attribute is not valid.', 'duplicate' => 'The :attribute is not valid.', diff --git a/src/lang/es/validate.php b/src/lang/es/validate.php index c886be9..923f4a3 100644 --- a/src/lang/es/validate.php +++ b/src/lang/es/validate.php @@ -7,8 +7,8 @@ 'capital-char-with-number' => ':attribute no es válido.', 'car-number' => ':attribute no es válido.', 'cart-number-iran' => ':attribute no es válido.', - 'credit-card' => ':attribute no es válido.', 'country' => ':attribute no es válido.', + 'credit-card' => ':attribute no es válido.', 'discord-username' => ':attribute no es válido.', 'domain' => ':attribute no es válido.', 'duplicate' => ':attribute no es válido.', diff --git a/src/lang/fa/validate.php b/src/lang/fa/validate.php index 58a8510..72975fb 100644 --- a/src/lang/fa/validate.php +++ b/src/lang/fa/validate.php @@ -7,8 +7,8 @@ 'capital-char-with-number' => 'مقدار :attribute صحیح نمی باشد.', 'car-number' => 'مقدار :attribute صحیح نمی باشد.', 'cart-number-iran' => 'مقدار :attribute صحیح نمی باشد.', - 'credit-card' => 'مقدار :attribute صحیح نمی باشد.', 'country' => 'مقدار :attribute صحیح نمی باشد.', + 'credit-card' => 'مقدار :attribute صحیح نمی باشد.', 'discord-username' => 'مقدار :attribute صحیح نمی باشد.', 'domain' => 'مقدار :attribute صحیح نمی باشد.', 'duplicate' => 'مقدار :attribute صحیح نمی باشد.', diff --git a/src/lang/fr/validate.php b/src/lang/fr/validate.php index 3a61819..b34fc3d 100644 --- a/src/lang/fr/validate.php +++ b/src/lang/fr/validate.php @@ -7,8 +7,8 @@ 'capital-char-with-number' => ":attribute n'est pas valide.", 'car-number' => ":attribute n'est pas valide.", 'cart-number-iran' => ":attribute n'est pas valide.", - 'credit-card' => ":attribute n'est pas valide.", 'country' => ":attribute n'est pas valide.", + 'credit-card' => ":attribute n'est pas valide.", 'discord-username' => ":attribute n'est pas valide.", 'domain' => ":attribute n'est pas valide.", 'duplicate' => ":attribute n'est pas valide.", diff --git a/src/lang/hi/validate.php b/src/lang/hi/validate.php index db49f15..a0c6577 100644 --- a/src/lang/hi/validate.php +++ b/src/lang/hi/validate.php @@ -7,8 +7,8 @@ 'capital-char-with-number' => ':attributeमान्य नहीं है।.', 'car-number' => ':attributeमान्य नहीं है।.', 'cart-number-iran' => ':attributeमान्य नहीं है।.', - 'credit-card' => ':attributeमान्य नहीं है।.', 'country' => ':attributeमान्य नहीं है।.', + 'credit-card' => ':attributeमान्य नहीं है।.', 'discord-username' => ':attributeमान्य नहीं है।.', 'domain' => ':attributeमान्य नहीं है।.', 'duplicate' => ':attributeमान्य नहीं है।.', diff --git a/src/lang/id/validate.php b/src/lang/id/validate.php index 27de97e..e53db54 100644 --- a/src/lang/id/validate.php +++ b/src/lang/id/validate.php @@ -7,8 +7,8 @@ 'capital-char-with-number' => ':Attribute tidak valid.', 'car-number' => ':Attribute tidak valid.', 'cart-number-iran' => ':Attribute tidak valid.', - 'credit-card' => ':Attribute tidak valid.', 'country' => ':Attribute tidak valid.', + 'credit-card' => ':Attribute tidak valid.', 'discord-username' => ':Attribute tidak valid.', 'domain' => ':Attribute tidak valid.', 'duplicate' => ':Attribute tidak valid.', diff --git a/src/lang/ja/validate.php b/src/lang/ja/validate.php index 4bbb1f0..ef54429 100644 --- a/src/lang/ja/validate.php +++ b/src/lang/ja/validate.php @@ -7,8 +7,8 @@ 'capital-char-with-number' => ':attribute有効じゃない。', 'car-number' => ':attribute有効じゃない。', 'cart-number-iran' => ':attribute有効じゃない。', - 'credit-card' => ':attribute有効じゃない。', 'country' => ':attribute有効じゃない。', + 'credit-card' => ':attribute有効じゃない。', 'discord-username' => ':attribute有効じゃない。', 'domain' => ':attribute有効じゃない。', 'duplicate' => ':attribute有効じゃない。', diff --git a/src/lang/ko/validate.php b/src/lang/ko/validate.php index d7587e0..929d8ee 100644 --- a/src/lang/ko/validate.php +++ b/src/lang/ko/validate.php @@ -7,8 +7,8 @@ 'capital-char-with-number' => ':attribute유효하지 않습니다.', 'car-number' => ':attribute유효하지 않습니다.', 'cart-number-iran' => ':attribute유효하지 않습니다.', - 'credit-card' => ':attribute유효하지 않습니다.', 'country' => ':attribute유효하지 않습니다.', + 'credit-card' => ':attribute유효하지 않습니다.', 'discord-username' => ':attribute유효하지 않습니다.', 'domain' => ':attribute유효하지 않습니다.', 'duplicate' => ':attribute유효하지 않습니다.', diff --git a/src/lang/ku_so/validate.php b/src/lang/ku_so/validate.php index 47aa011..cddf0a7 100644 --- a/src/lang/ku_so/validate.php +++ b/src/lang/ku_so/validate.php @@ -7,8 +7,8 @@ 'capital-char-with-number' => 'ئەو :attribute هەڵبژێردراوە نادروستە.', 'car-number' => 'ئەو :attribute هەڵبژێردراوە نادروستە.', 'cart-number-iran' => 'ئەو :attribute هەڵبژێردراوە نادروستە.', - 'credit-card' => 'ئەو :attribute هەڵبژێردراوە نادروستە.', 'country' => 'ئەو :attribute هەڵبژێردراوە نادروستە.', + 'credit-card' => 'ئەو :attribute هەڵبژێردراوە نادروستە.', 'discord-username' => 'ئەو :attribute هەڵبژێردراوە نادروستە.', 'domain' => 'ئەو :attribute هەڵبژێردراوە نادروستە.', 'duplicate' => 'ئەو :attribute هەڵبژێردراوە نادروستە.', diff --git a/src/lang/mk/validate.php b/src/lang/mk/validate.php index d84382b..fd9e2b2 100644 --- a/src/lang/mk/validate.php +++ b/src/lang/mk/validate.php @@ -7,8 +7,8 @@ 'capital-char-with-number' => 'Невалидна вредност :attribute', 'car-number' => 'Невалидна вредност :attribute', 'cart-number-iran' => 'Невалидна вредност :attribute', - 'credit-card' => 'Невалидна вредност :attribute', 'country' => 'Невалидна вредност :attribute', + 'credit-card' => 'Невалидна вредност :attribute', 'discord-username' => 'Невалидна вредност :attribute', 'domain' => 'Невалидна вредност :attribute', 'duplicate' => 'Невалидна вредност :attribute', diff --git a/src/lang/pt_BR/validate.php b/src/lang/pt_BR/validate.php index 2a43dfc..b2debbb 100644 --- a/src/lang/pt_BR/validate.php +++ b/src/lang/pt_BR/validate.php @@ -7,8 +7,8 @@ 'capital-char-with-number' => 'O :attribute não é válido.', 'car-number' => 'O :attribute não é válido.', 'cart-number-iran' => 'O :attribute não é válido.', - 'credit-card' => 'O :attribute não é válido.', 'country' => 'O :attribute não é válido.', + 'credit-card' => 'O :attribute não é válido.', 'discord-username' => 'O :attribute não é válido.', 'domain' => 'O :attribute não é válido.', 'duplicate' => 'O :attribute não é válido.', diff --git a/src/lang/ru/validate.php b/src/lang/ru/validate.php index 229574e..befcc69 100644 --- a/src/lang/ru/validate.php +++ b/src/lang/ru/validate.php @@ -7,8 +7,8 @@ 'capital-char-with-number' => ':attribute не действует.', 'car-number' => ':attribute не действует.', 'cart-number-iran' => ':attribute не действует.', - 'credit-card' => ':attribute не действует.', 'country' => ':attribute не действует.', + 'credit-card' => ':attribute не действует.', 'discord-username' => ':attribute не действует.', 'domain' => ':attribute не действует.', 'duplicate' => ':attribute не действует.', diff --git a/src/lang/si/validate.php b/src/lang/si/validate.php index 75d3697..2198a55 100644 --- a/src/lang/si/validate.php +++ b/src/lang/si/validate.php @@ -7,8 +7,8 @@ 'capital-char-with-number' => ':attribute වලංගු නොවේ.', 'car-number' => ':attribute වලංගු නොවේ.', 'cart-number-iran' => ':attribute වලංගු නොවේ.', - 'credit-card' => ':attribute වලංගු නොවේ.', 'country' => ':attribute වලංගු නොවේ.', + 'credit-card' => ':attribute වලංගු නොවේ.', 'discord-username' => ':attribute වලංගු නොවේ.', 'domain' => ':attribute වලංගු නොවේ.', 'duplicate' => ':attribute වලංගු නොවේ.', diff --git a/src/lang/sv/validate.php b/src/lang/sv/validate.php index 766c001..9e8310f 100644 --- a/src/lang/sv/validate.php +++ b/src/lang/sv/validate.php @@ -7,8 +7,8 @@ 'capital-char-with-number' => 'Värdet :attribute är inte korrekt.', 'car-number' => 'Värdet :attribute är inte korrekt.', 'cart-number-iran' => 'Värdet :attribute är inte korrekt.', - 'credit-card' => 'Värdet :attribute är inte korrekt.', 'country' => 'Värdet :attribute är inte korrekt.', + 'credit-card' => 'Värdet :attribute är inte korrekt.', 'discord-username' => 'Värdet :attribute är inte korrekt.', 'domain' => 'Värdet :attribute är inte korrekt.', 'duplicate' => 'Värdet :attribute är inte korrekt.', diff --git a/src/lang/tr/validate.php b/src/lang/tr/validate.php index 17a05e8..7b40e7f 100644 --- a/src/lang/tr/validate.php +++ b/src/lang/tr/validate.php @@ -7,8 +7,8 @@ 'capital-char-with-number' => ':attribute doğru değil.', 'car-number' => ':attribute doğru değil.', 'cart-number-iran' => ':attribute doğru değil.', - 'credit-card' => ':attribute doğru değil.', 'country' => ':attribute doğru değil.', + 'credit-card' => ':attribute doğru değil.', 'discord-username' => ':attribute doğru değil.', 'domain' => ':attribute doğru değil.', 'duplicate' => ':attribute doğru değil.', diff --git a/src/lang/uk/validate.php b/src/lang/uk/validate.php index 2e74167..aafb4c5 100644 --- a/src/lang/uk/validate.php +++ b/src/lang/uk/validate.php @@ -7,8 +7,8 @@ 'capital-char-with-number' => ':attribute не є дійсним.', 'car-number' => ':attribute не є дійсним.', 'cart-number-iran' => ':attribute не є дійсним.', - 'credit-card' => ':attribute не є дійсним.', 'country' => ':attribute не є дійсним.', + 'credit-card' => ':attribute не є дійсним.', 'discord-username' => ':attribute не є дійсним.', 'domain' => ':attribute не є дійсним.', 'duplicate' => ':attribute не є дійсним.', diff --git a/src/lang/zh_CN/validate.php b/src/lang/zh_CN/validate.php index ec07e29..6768cd8 100644 --- a/src/lang/zh_CN/validate.php +++ b/src/lang/zh_CN/validate.php @@ -7,8 +7,8 @@ 'capital-char-with-number' => ':attribute无效.', 'car-number' => ':attribute无效.', 'cart-number-iran' => ':attribute无效.', - 'credit-card' => ':attribute无效.', 'country' => ':attribute无效.', + 'credit-card' => ':attribute无效.', 'discord-username' => ':attribute无效.', 'domain' => ':attribute无效.', 'duplicate' => ':attribute无效.',