mirror of
https://github.com/astaxie/beego.git
synced 2024-11-25 20:10:56 +00:00
fix exist typo
This commit is contained in:
parent
de5650b723
commit
713503e43d
@ -224,7 +224,7 @@ func parseFunc(vfunc, key string, label string) (v ValidFunc, err error) {
|
|||||||
func numIn(name string) (num int, err error) {
|
func numIn(name string) (num int, err error) {
|
||||||
fn, ok := funcs[name]
|
fn, ok := funcs[name]
|
||||||
if !ok {
|
if !ok {
|
||||||
err = fmt.Errorf("doesn't exsits %s valid function", name)
|
err = fmt.Errorf("doesn't exists %s valid function", name)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// sub *Validation obj and key
|
// 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)
|
ts = make([]interface{}, len(s), len(s)+1)
|
||||||
fn, ok := funcs[name]
|
fn, ok := funcs[name]
|
||||||
if !ok {
|
if !ok {
|
||||||
err = fmt.Errorf("doesn't exsits %s valid function", name)
|
err = fmt.Errorf("doesn't exists %s valid function", name)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
for i := 0; i < len(s); i++ {
|
for i := 0; i < len(s); i++ {
|
||||||
|
@ -42,7 +42,7 @@ func TestGetValidFuncs(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
f, _ = tf.FieldByName("Tag")
|
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)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user