Why do I keep saying that the confirmation password is the same as the password I filled in, but it keeps saying they are inconsistent? May I ask what the reason is?
Roue2018-06-15 15:42:25
0
7
4510
Why does the confirmation password keep saying that it is inconsistent with the password you filled in? May I ask what is the reason?
'password|password'=>[ 'require'=>'require', 'alphaNum'=>'alphaNum',// Only letters plus numbers are allowed 'length'=>'6,20',//Length limitation 'confirm'=>'confirm',//Automatically perform equality verification with the password_confirm field ] ,
If you write it in the above way, there will be a problem that the confirmation password is the same as the password and it keeps saying that it is inconsistent
If you write 'confirm'=>'confirm as 'confirm' There is no problem
This shows that there are still some problems with the way of writing 'confirm'=>'confirm'.
Password and password_confirm directly write a fixed value verification, and the returned password and confirmation fields are inconsistent. It’s better to go to the front-end verification.
After multiple verifications
'password|password'=>[
'require'=>'require',
'alphaNum'=>'alphaNum',// Only letters plus numbers are allowed
'length'=>'6,20',//Length limitation
'confirm'=>'confirm',//Automatically perform equality verification with the password_confirm field
] ,
If you write it in the above way, there will be a problem that the confirmation password is the same as the password and it keeps saying that it is inconsistent
If you write 'confirm'=>'confirm as 'confirm' There is no problem
This shows that there are still some problems with the way of writing 'confirm'=>'confirm'.
I have the same problem as you, and I haven't found any reason. Have you found the reason now?
Just change password_confirm to confirm
<input type="password" name="confirm" class="form-control" id="inputPassword4" placeholder="password confirm">
Password and password_confirm directly write a fixed value verification, and the returned password and confirmation fields are inconsistent. It’s better to go to the front-end verification.
It is possible that the name of the input is not written correctly.
It may be that the name value received by the backend is inconsistent with the name value submitted by the front end.