Documentation ¶
Index ¶
Constants ¶
View Source
const ( TAG_VALIDATOR = "validator" V_REQUIRED = "required" V_MIN = "min" V_MAX = "max" V_MIN_LENGTH = "minlength" V_MAX_LENGTH = "maxlength" V_EMAIL = "email" V_IDCARD = "idcard" V_REGEX = "regex" V_NUMBER = "number" V_PHONE = "phone" V_LENGTH = "length" )
Variables ¶
This section is empty.
Functions ¶
func GetValidatorTag ¶
func PrintValidate ¶
func PrintValidate(v interface{})
Types ¶
type RequiredValidator ¶
func NewRequiredValidator ¶
func NewRequiredValidator(v interface{}, field string) *RequiredValidator
func (*RequiredValidator) Validate ¶
func (vd *RequiredValidator) Validate() (bool, string)
Validate implement Validator.
Click to show internal directories.
Click to hide internal directories.