// Validate checks the field values on RegistrationRequest with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
Validate checks the field values on RegistrationRequest with the rules
defined in the proto definition for this message. If any rules are
violated, an error is returned.
// Validate checks the field values on RegistrationRequest with the rules // defined in the proto definition for this message . If any rules are // violated an error is returned .
func (m *RegistrationRequest) Validate() error {
	if m == nil {
		return nil
	}
	if err := m._validateEmail(m.GetEmail()); err != nil {
		return RegistrationRequestValidationError{
			field:  "Email",
			reason: "value must be a valid email address",
			cause:  err,
		}
	}
	if utf8.RuneCountInString(m.GetPassword()) < 6 {
		return RegistrationRequestValidationError{
			field:  "Password",
			reason: "value length must be at least 6 runes",
		}
	}
	return nil
}
func ( m * RegistrationRequest ) Validate ( ) error { if m == nil { return nil } if err := m . _validateEmail ( m . GetEmail ( ) ) ; err != nil { return RegistrationRequestValidationError { field : " " , reason : " " , cause : err , } } if utf8 . RuneCountInString ( m . GetPassword ( ) ) < 6 { return RegistrationRequestValidationError { field : " " , reason : " " , } } return nil }
Validate checks the field values on RegistrationRequest with the rules
defined in the proto definition for this message.
Validate checks the field values on RegistrationRequest with the rules defined in the proto definition for this message .