Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

abkrim's avatar
Level 13

PasswordConfirmation with translations not work validation

My app uses translations.

I use latest laravel nova 2.X and laravel 6.X

When try use translations, validations not check if user confirm password or if this is wrong. Save form without confirmation.

Password::make(__('Password'), 'password')
    ->onlyOnForms()
    ->creationRules('required', 'string', 'min:8')
    ->updateRules('nullable', 'string', 'min:8'),

PasswordConfirmation::make(__('Password Confirmation'), 'password_confirmation')
->onlyOnForms(),

Any mistake on code?

0 likes
5 replies
bugsysha's avatar

At a glance the code looks OK, but what exact errors are you getting?

abkrim's avatar
Level 13

If user change password and not put anything in input Password Confirmation, app save or update data, instead stop and show error of validation.

bugsysha's avatar
bugsysha
Best Answer
Level 61

You need to add create/update rules for PasswordConfirmation field also. Use same:field rule for it.

same:password
2 likes

Please or to participate in this conversation.