Add validation to the registration form