Closed poseso closed 4 years ago
Run the following at the root of your project:
php artisan vendor:publish --provider="LangleyFoxall\LaravelNISTPasswordRules\ServiceProvider"
Then take a look the files within /resources/lang/vendor/laravel-nist-password-rules/
. You should be able to create a new directory (copy the en
one) for your desired language, and then alter the validation.php
file within it. Ensure you then change your app's locale within the config/app.php
file.
Works good using the lang vendor files, is it possible to manually set the message instead of using the lang files ?
Using language files is the more standard way to do it. That's how you alter the content for the built in Laravel validation messages too.
Ok good! thank you!
I'm trying to give my own custom messages to the validation rules but can't find how to setMessage for these ones:
laravel-nist-password-rules::validation.can-not-be-sequential-characters laravel-nist-password-rules::validation.found-in-data-breach
i'm using form request for this purpose:
Custom message for BreachedPasswords() works but can't do the same for:
is this possible ?
Thanks