Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StringType ¶
type StringType string
StringType validator will be overridden by validation tags in-place
func (StringType) Validate ¶
func (t StringType) Validate() error
func (StringType) ValidateNotEmpty ¶
func (t StringType) ValidateNotEmpty() error
type User ¶
type User struct { FirstName StringType `validate:"min_len=2,max_len=15"` LastName string `validate:"min_len=1,max_len=15"` NonEmptyString StringType `validate:"func=.ValidateNotEmpty"` FamilyMembers IntType `validate:"min=1,max=100"` SomeFloat FloatType `validate:"min=2.55,max=99.99"` SomeMap MapType `validate:"min_items=2,key=[max_len=64],value=[min=-35,max=34]"` SomePointer *StringType `validate:"not_null,min_len=20,max_len=150"` SomePointerNullable *StringType `validate:"nullable"` }
Click to show internal directories.
Click to hide internal directories.