Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Field ¶
type Field interface { Name() string Value() interface{} TypeName() string ValidateIfExists() bool HideParentName() bool Omitempty() bool IsStruct() bool IsSlice() bool IsRequired() bool MustValidateType() bool Hints() []string IsValid() ([]rules.FieldError, bool) GenerateNestedFields() []Field GenerateRules() []rules.Rule ExtractValueFrom(data map[string]interface{}) interface{} SetName(value string) SetValue(value interface{}) SetValidateIfExists(value bool) }
type ValidationError ¶
type ValidationError interface { String() string Messages() []string Fields() []string RuleTypes() []string FieldsErrors() []rules.FieldError }
func ValidateDTO ¶
func ValidateDTO[T interface{}](data interface{}) (*T, ValidationError)
func ValidateDTOPartially ¶
func ValidateDTOPartially[T interface{}](data interface{}) (*T, ValidationError)
Click to show internal directories.
Click to hide internal directories.