func (u *User) Validate() error {
	if u.Name == "" {
		return errors.New("name required")
	}
	if u.Created.IsZero() {
		return errors.New("created time required")
	}
	if u.Modified.IsZero() {
		return errors.New("modified time required")
	}
	return nil
}
// Validate validates that all of the data in the user appears valid and self
// consistent. A nil return value means no errors were detected.
Validate validates that all of the data in the user appears valid and self
consistent. A nil return value means no errors were detected.
// Validate validates that all of the data in the user appears valid and self // consistent . A nil return value means no errors were detected .
func (u *User) Validate() error {
	if u.Name == "" {
		return errors.New("name required")
	}
	if u.Created.IsZero() {
		return errors.New("created time required")
	}
	if u.Modified.IsZero() {
		return errors.New("modified time required")
	}
	return nil
}
func ( u * User ) Validate ( ) error { if u . Name == " " { return errors . New ( " " ) } if u . Created . IsZero ( ) { return errors . New ( " " ) } if u . Modified . IsZero ( ) { return errors . New ( " " ) } return nil }
Validate validates that all of the data in the user appears valid and self
consistent.
Validate validates that all of the data in the user appears valid and self consistent .