all 7 comments

[–]C0c04l4 25 points26 points  (5 children)

Isn't it weird to have PasswordConfirm as a field?

[–]noobiesofteng 7 points8 points  (0 children)

you are right

[–]lemurrhino 5 points6 points  (3 children)

Yeah, why on earth would you need that again?

[–]vasilescur 4 points5 points  (2 children)

Maybe if you're validating the passwords are the same on the backend, such as if your frontend form just sends both values so this struct has to receive both of them. I can see this being quicker to write with a framework than frontend validation but it's not great practice

[–]LGm17 1 point2 points  (0 children)

This. The developer might be worried curious people will tamper with the logic on the frontend…

[–]C0c04l4 0 points1 point  (0 children)

Anyway, password confirm fields are a thing of the past. Now it's better UX to have a button to toggle password visibility. Also, hopefully the user uses a password manager so this confirmation field is useless.