mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 08:50:56 +00:00
commit
2410b364af
@ -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++ {
|
||||
|
@ -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)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user