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
{{ message }}
This repository was archived by the owner on Jul 16, 2023. It is now read-only.
'HTML' => 'Illuminate\Support\Facades\HTML', // if not exists add for html too
58
-
'Form' => 'Bllim\Laravalid\Facade',
59
-
),
56
+
'HTML' => 'Illuminate\Support\Facades\HTML',
57
+
'Form' => 'LaravelArdent\Laravalid\Facade',
58
+
],
60
59
```
61
60
62
61
Also you need to publish configuration file and assets by running the following Artisan commands.
63
62
```php
64
-
$ php artisan vendor:publish
63
+
$ ./artisan vendor:publish
65
64
```
66
65
67
66
### Configuration
@@ -70,8 +69,9 @@ After publishing configuration file, you can find it in config/laravalid folder.
70
69
| Parameter | Description | Values |
71
70
|-----------|-------------|--------|
72
71
| plugin | Choose plugin you want to use | See [Plugins and Supported Rules](#plugins-and-supported-rules)|
73
-
| useLaravelMessages | If it is true, laravel validation messages are used in client side otherwise messages of chosen plugin are used | true/false |
74
-
| route | Route name for remote validation | Any route name (default: laravalid) |
72
+
| useLaravelMessages | If it is true, laravel validation messages are used in client side otherwise messages of chosen plugin are used |`boolean`. See [Validation Messages](#validation-messages)|
73
+
| route | Route name for remote validation | Any route name (default: laravalid). The route will receive an argument named `rule`|
74
+
| action | A custom action to run the remote validation procedure | An action string, such as `SiteController@getValidation`. You must create that action if you plan to run remote validations. This is needed if you want to cache routes (`./artisan route:cache`)
75
75
76
76
#### Validation Messages
77
77
If you set `useLaravelMessages` to `true`, you're able to use (Laravel's Localization package)[l10n] to generate validation messages. To do so, follow the [docs][l10n] to get the package configured (by setting your default/fallback/current locales). Then, create a folder for each locale (as the docs says) and create a `validation.php` file for each one. Inside those files you'll set a message for each rule name, as follows:
0 commit comments