added validations for registration