
This is a form you could use as a login form for a membership website.
The form validates that the username is an email, the password is at least 10 characters long..
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 data.
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 is submitted with the form for the button that was clicked.