Awesome job adding client-side validation to
Let’s quickly recap:
requiredattribute to an input related element will validate that the input field has information in it.
minattribute of a number input element will validate an acceptable minimum value.
maxattribute of a number input element will validate an acceptable maximum value.
minlengthattribute of a text input element will validate an acceptable minimum number of characters.
maxlengthattribute of a text input element will validate an acceptable maximum number of characters.
patternmatches the input to the provided regex.
<form>do not pass, the user gets a message explaining why and the
<form>cannot be submitted.
These quick checks help ensure that input data is correct and safe for our servers. It also helps give users immediate feedback on what they need to fix instead of having to wait for a server to send back that information.