eggplantSword's avatar

Changing the password defaults validation messages

I'm using Password::defaults() on my validation rules but the messages always come up in English when I have my lang set as es for Spanish.

I set the messages like this in /es/validation.php, I even set them in the English file as well.

    'password' => [
        'letters'           => 'El campo :attribute debe tener al menos una letra.',
        'mixed'             => 'El campo :attribute debe contener al menos una letra mayúscula y una letra minúscula.',
        'numbers'           => 'El campo :attribute debe contener al menos un numero.',
        'symbols'           => 'El campo :attribute debe contener al menos un símbolo.',
        'uncompromised'     => 'El campo :attribute ha aparecido en un leak de datos. Por favor elegir otro valor.',
    ],

However it doesn't work and still always shows the messages in English vs Spanish, the other validation errors work fine in Spanish, it seems to be just the password messages. I'm using Laravel 8.29.

Why is this happening?

0 likes
0 replies

Please or to participate in this conversation.