Documentation ¶
Index ¶
Constants ¶
View Source
const ( Invalid = reflect.Invalid Bool = reflect.Bool Int = reflect.Int Int8 = reflect.Int8 Int16 = reflect.Int16 Int32 = reflect.Int32 Int64 = reflect.Int64 Uint = reflect.Uint Uint8 = reflect.Uint8 Uint16 = reflect.Uint16 Uint32 = reflect.Uint32 Uint64 = reflect.Uint64 Float32 = reflect.Float32 Float64 = reflect.Float64 String = reflect.String Date = reflect.UnsafePointer + 255 Email = Date + 1 )
A Kind represents the specific kind of type that a Type represents. The zero Kind is not a valid kind.
Variables ¶
This section is empty.
Functions ¶
func Register ¶ added in v1.1.3
func Register(name string, vf VerifyFunc)
Register a validator provide by the vfuncs name
Types ¶
type Validator ¶ added in v1.1.3
type Validator struct {
Lang string //default en
}
Validator a validate
func (*Validator) Request ¶ added in v1.1.3
Request verify that the url.Values data is validate data rules is validate rule such as:
key1@required|int|min:1 key2/key2_translator@required|string|min:1|max:12 key3@sometimes|required|date
Click to show internal directories.
Click to hide internal directories.