Versions in this module Expand all Collapse all v1 v1.0.0 Sep 13, 2023 Changes in this version + func ISNationalCode(idNum string) bool + func IsCreditCardNumber(num string) bool + func IsIDNumber(idNum string) bool + func IsIP(address string) bool + func IsIPPort(address string) bool + func IsIdentifier(id string) bool + func IsMobile(mobile string) bool + func IsPostalcode(postalCode string) bool + func IsTel(tel string) bool + func IsUUID(uuid string) bool + func IsUnsigned(num string) bool + func IsUsername(username string) bool + func ValidateUploadExt(file *multipart.FileHeader, exts ...string) (bool, error) + func ValidateUploadMime(file *multipart.FileHeader, mimes ...string) (bool, error) + func ValidateUploadSize(file *multipart.FileHeader, min string, max string) (bool, error) + type ErrorResponse interface + AddError func(field, tag, message string) + Errors func() map[string]map[string]string + Failed func(field string) bool + FailedOn func(field, err string) bool + HasError func() bool + MarshalJSON func() ([]byte, error) + Messages func() map[string][]string + Rules func() map[string][]string + String func() string + func Invalidate(field, err string) ErrorResponse + func NewErrorResponse() ErrorResponse + type Validator interface + AddTranslation func(locale string, key string, message string) + AddValidation func(tag string, v validator.Func) + Struct func(s any) ErrorResponse + StructExcept func(s any, fields ...string) ErrorResponse + StructExceptLocale func(locale string, s any, fields ...string) ErrorResponse + StructLocale func(locale string, s any) ErrorResponse + StructPartial func(s any, fields ...string) ErrorResponse + StructPartialLocale func(locale string, s any, fields ...string) ErrorResponse + Translate func(locale string, key string, placeholders map[string]string) string + TranslateStruct func(s any, locale string, key string, field string, placeholders map[string]string) string + Validator func() *validator.Validate + Var func(params ValidatorParam, field any, tag string, messages map[string]string) ErrorResponse + VarLocale func(locale string, params ValidatorParam, field any, tag string, ...) ErrorResponse + VarWithValue func(params ValidatorParam, field any, other any, tag string, ...) ErrorResponse + VarWithValueLocale func(locale string, params ValidatorParam, field any, other any, tag string, ...) ErrorResponse + func NewValidator(t translator.Translator, locale string) Validator + type ValidatorParam struct + Format bool + Name string + ParamTitle string + Title string