From 0d1b9856edf54b5319aaf6586987b465b6ed92b2 Mon Sep 17 00:00:00 2001 From: Manu Mtz-Almeida Date: Sun, 31 May 2015 17:03:15 +0200 Subject: [PATCH] Adds shortcut for disabling bind validation. --- mode.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mode.go b/mode.go index 77265f8..15efaeb 100644 --- a/mode.go +++ b/mode.go @@ -8,6 +8,7 @@ import ( "io" "os" + "github.com/gin-gonic/gin/binding" "github.com/mattn/go-colorable" ) @@ -51,6 +52,10 @@ func SetMode(value string) { modeName = value } +func DisableBindValidation() { + binding.Validator = nil +} + func Mode() string { return modeName }