func (m *CustomRuleError) validateSeverityEnum(path, location string, value string) error {
	if err := validate.Enum(path, location, value, customRuleErrorTypeSeverityPropEnum); err != nil {
		return err
	}
	return nil
}
prop value enum
package models
import (
	"encoding/json"
	"github.com/go-openapi/errors"
	"github.com/go-openapi/strfmt"
	"github.com/go-openapi/swag"
	"github.com/go-openapi/validate"
)
type CustomRuleError struct {
	Severity string `json:"severity,omitempty"`
	Text string `json:"text,omitempty"`
}
func (m *CustomRuleError) Validate(formats strfmt.Registry) error {
	var res []error
	if err := m.validateSeverity(formats); err != nil {
		res = append(res, err)
	}
	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
var customRuleErrorTypeSeverityPropEnum []interface{}
func init() {
	var res []string
	if err := json.Unmarshal([]byte(`["error","warning"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		customRuleErrorTypeSeverityPropEnum = append(customRuleErrorTypeSeverityPropEnum, v)
	}
}
const (
	CustomRuleErrorSeverityError string = "error"
	CustomRuleErrorSeverityWarning string = "warning"
)