diff --git a/validation/util.go b/validation/util.go index e2cfb3b7..82206f4f 100644 --- a/validation/util.go +++ b/validation/util.go @@ -224,7 +224,7 @@ func parseFunc(vfunc, key string, label string) (v ValidFunc, err error) { func numIn(name string) (num int, err error) { fn, ok := funcs[name] if !ok { - err = fmt.Errorf("doesn't exsits %s valid function", name) + err = fmt.Errorf("doesn't exists %s valid function", name) return } // sub *Validation obj and key @@ -236,7 +236,7 @@ func trim(name, key string, s []string) (ts []interface{}, err error) { ts = make([]interface{}, len(s), len(s)+1) fn, ok := funcs[name] if !ok { - err = fmt.Errorf("doesn't exsits %s valid function", name) + err = fmt.Errorf("doesn't exists %s valid function", name) return } for i := 0; i < len(s); i++ { diff --git a/validation/util_test.go b/validation/util_test.go index e74d50ed..553301e2 100644 --- a/validation/util_test.go +++ b/validation/util_test.go @@ -42,7 +42,7 @@ func TestGetValidFuncs(t *testing.T) { } f, _ = tf.FieldByName("Tag") - if _, err = getValidFuncs(f); err.Error() != "doesn't exsits Maxx valid function" { + if _, err = getValidFuncs(f); err.Error() != "doesn't exists Maxx valid function" { t.Fatal(err) }