func (pc PayloadClass) Validate() error {
	if pc.Name == "" {
		return fmt.Errorf("payload class missing name")
	}
	if !names.IsValidPayload(pc.Name) {
		return fmt.Errorf("invalid payload class %q", pc.Name)
	}

	if pc.Type == "" {
		return fmt.Errorf("payload class missing type")
	}

	return nil
}
// Validate checks the payload class to ensure its data is valid.
Validate checks the payload class to ensure its data is valid.
// Validate checks the payload class to ensure its data is valid .
func (pc PayloadClass) Validate() error {
	if pc.Name == "" {
		return fmt.Errorf("payload class missing name")
	}
	if !names.IsValidPayload(pc.Name) {
		return fmt.Errorf("invalid payload class %q", pc.Name)
	}
	if pc.Type == "" {
		return fmt.Errorf("payload class missing type")
	}
	return nil
}
func ( pc PayloadClass ) Validate ( ) error { if pc . Name == " " { return fmt . Errorf ( " " ) } if ! names . IsValidPayload ( pc . Name ) { return fmt . Errorf ( " " , pc . Name ) } if pc . Type == " " { return fmt . Errorf ( " " ) } return nil }
Validate checks the payload class to ensure its data is valid.
Validate checks the payload class to ensure its data is valid .