From 688d188325450b81abea66b7fd3a98e31e39398b Mon Sep 17 00:00:00 2001 From: kot Date: Fri, 20 Nov 2020 17:42:53 +0500 Subject: [PATCH] change err --- validation.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/validation.go b/validation.go index a802469..95f6770 100644 --- a/validation.go +++ b/validation.go @@ -3,6 +3,7 @@ package validation import ( "fmt" + "net/http" "reflect" "strconv" @@ -112,7 +113,7 @@ func validateSlice(rv reflect.Value) goerr.IError { } } if len(errs.GetDetails()) > 0 { - return errs + return errs.HTTP(http.StatusBadRequest) } return nil }