Form Validation

The browser checks the fields first (required, length, pattern, email, number range). When they pass, the form is sent to the server, which can still say no: the usernames tomsmith and admin are taken. Server errors show under each field.