func (t *TermsId) Validate() error {
	if t.Tenant != "" && t.Tenant != "cs" {
		if !validTermName.MatchString(t.Tenant) {
			return errors.Errorf("wrong term tenant format %q", t.Tenant)
		}
	}
	if t.Owner != "" && !names.IsValidUser(t.Owner) {
		return errors.Errorf("wrong owner format %q", t.Owner)
	}
	if !validTermName.MatchString(t.Name) {
		return errors.Errorf("wrong term name format %q", t.Name)
	}
	if t.Revision < 0 {
		return errors.Errorf("negative term revision")
	}
	return nil
}
// Validate returns an error if the Term contains invalid data.
Validate returns an error if the Term contains invalid data.
// Validate returns an error if the Term contains invalid data .
func (t *TermsId) Validate() error {
	if t.Tenant != "" && t.Tenant != "cs" {
		if !validTermName.MatchString(t.Tenant) {
			return errors.Errorf("wrong term tenant format %q", t.Tenant)
		}
	}
	if t.Owner != "" && !names.IsValidUser(t.Owner) {
		return errors.Errorf("wrong owner format %q", t.Owner)
	}
	if !validTermName.MatchString(t.Name) {
		return errors.Errorf("wrong term name format %q", t.Name)
	}
	if t.Revision < 0 {
		return errors.Errorf("negative term revision")
	}
	return nil
}
func ( t * TermsId ) Validate ( ) error { if t . Tenant != " " && t . Tenant != " " { if ! validTermName . MatchString ( t . Tenant ) { return errors . Errorf ( " " , t . Tenant ) } } if t . Owner != " " && ! names . IsValidUser ( t . Owner ) { return errors . Errorf ( " " , t . Owner ) } if ! validTermName . MatchString ( t . Name ) { return errors . Errorf ( " " , t . Name ) } if t . Revision < 0 { return errors . Errorf ( " " ) } return nil }
Validate returns an error if the Term contains invalid data.
Validate returns an error if the Term contains invalid data .