If this form is submitted with an empty username or password, a 400 error will be thrown in a new page: The key "_password" must be a non-empty string. By adding "required" the user will instead get a more helpful "Please fill in this field." error on screen next to the appropriate box which is a much better experience.
If this form is submitted with an empty username or password, a 400 error will be thrown in a new page: The key "_password" must be a non-empty string. By adding "required" the user will instead get a more helpful "Please fill in this field." error on screen next to the appropriate box which is a much better experience.