You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -163,6 +163,7 @@ Also, you can make <a href="https://github.com/milwad-dev/laravel-validate/pulls
163
163
If you need to add a custom phone number validator for a specific country, follow the steps below.
164
164
165
165
### 1. Create Your Custom Validator Class
166
+
166
167
First, you need to create a custom validator class that implements the `Milwad\LaravelValidate\Utils\CountryPhoneValidator` contract. This contract ensures that your custom validator adheres to the required structure and functionality.
167
168
168
169
```php
@@ -185,7 +186,8 @@ class CustomPhoneValidator implements CountryPhoneValidator
185
186
```
186
187
187
188
### 2. Add the Validator to the Configuration File
188
-
Once you've created the custom validator class, add it to the configuration file (`config/phone-country.php`) under the `'phone-country'` array.
189
+
190
+
Once you've created the custom validator class, add it to the configuration file (`config/laravel-validate.php`) under the `'phone-country'` array.
189
191
190
192
For example, if you're adding a validator for the country `XY`:
0 commit comments