Passing locale to Laravel validator: is this possible?
P粉792673958
P粉792673958 2024-03-26 17:30:53
0
1
392

In my laravel controller I validate the request like this:

$validatedData = $request->validate(UserValidator::$updateIfNeeded);

Now, is it possible to pass a locale string to the validator, like "es" or "en"?

P粉792673958
P粉792673958

reply all(1)
P粉226642568

There is no need to do this, Laravel's built-in validation rules each have an error message, which is located in your application's lang/en/validation.php file. In this file you will find translation entries for each validation rule. You are free to change or modify these messages according to the needs of your application.

Also, you can...%8

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template