mirror of
https://github.com/gin-gonic/gin.git
synced 2025-06-17 08:33:58 +08:00
Experimenting with new validation library!!!
This commit is contained in:
@ -4,7 +4,11 @@
|
||||
|
||||
package binding
|
||||
|
||||
import "net/http"
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"gopkg.in/joeybloggs/go-validate-yourself.v4"
|
||||
)
|
||||
|
||||
const (
|
||||
MIMEJSON = "application/json"
|
||||
@ -21,6 +25,8 @@ type Binding interface {
|
||||
Bind(*http.Request, interface{}) error
|
||||
}
|
||||
|
||||
var _validator = validator.NewValidator("binding", validator.BakedInValidators)
|
||||
|
||||
var (
|
||||
JSON = jsonBinding{}
|
||||
XML = xmlBinding{}
|
||||
|
Reference in New Issue
Block a user