Adding validation for the registration form