chopshop-166 / SignInWebApp

Web app for team management and signing in to locations
MIT License
3 stars 1 forks source link

fix: Password Validation #87

Closed bot190 closed 2 years ago

bot190 commented 2 years ago

The password field should only be required when a user is registering, and it should validate the length of the password.

The Length validator will fail the minimum length check if no password is required, so I've removed it from the definition of the password field as this form is used in various edit user pages where we do not want to have to enter the users password.

While DataRequired isn't strictly necessary for the password field I have left it to be very explicit about the intention (and guard against future changes in the implementation of the Length validator)