validation for registration