add register and validation for the form