Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ModelValidator ¶
ModelValidator is the interface to validate model objects
type ModelValidatorObj ¶
ModelValidatorObj implements the ModelValidator per default
func NewModelValidator ¶
func NewModelValidator(obj model.Model) *ModelValidatorObj
NewModelValidator creates an new pointer instance of ModelValidatorObj with default values
func (*ModelValidatorObj) IsValid ¶
func (v *ModelValidatorObj) IsValid() bool
IsValid check if v.Validate() returns any error or not
func (*ModelValidatorObj) Validate ¶
func (v *ModelValidatorObj) Validate() error
Validate runs the validations in the v.Obj (if defined) TODO: Add custom error message here
Click to show internal directories.
Click to hide internal directories.