Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CronExpression ¶
CronExpression validates a cron expression.
It only supports 5 fields (minute, hour, day of month, month, day of week).
It returns a boolean indicating whether the expression is valid or not.
Types ¶
type StructError ¶
type StructError struct {
// contains filtered or unexported fields
}
StructError is the error returned by Struct.
func Struct ¶
func Struct[T any](sPointer *T) *StructError
Struct validates the given struct using go-playground/validator.
func StructSlice ¶
func StructSlice[T any](sPointerSlice *[]T) *StructError
StructSlice validates the given slice of structs using go-playground/validator.
func (*StructError) Error ¶
func (e *StructError) Error() string
Error returns all the errors as a string separated by commas.
func (*StructError) Errors ¶
func (e *StructError) Errors() []string
Errors returns all the errors as a slice of strings.
func (*StructError) ErrorsRaw ¶
func (e *StructError) ErrorsRaw() []error
ErrorsRaw returns all the errors as a slice of errors.
func (*StructError) HasErrs ¶
func (e *StructError) HasErrs() bool
HasErrs returns true if there are errors.
Click to show internal directories.
Click to hide internal directories.