Implement simple validation for registration.