
This is a form you could use as a login form for a membership website.
The form validates that the username is an email and the password is at least 10 characters long. Both the email and password are required fields.
The form can also be used for new user registration - in which case the user is asked to enter their password twice. The form checks the password and confirmation are the same before submitting the credentials.
The form uses custom buttons which have a value (e.g. the Login button has a value of "login" and the Register button a value of "register"). This value of the button that was clicked is submitted with the form.