1
0
mirror of https://github.com/astaxie/beego.git synced 2024-12-23 01:20:49 +00:00

Merge pull request #3923 from timchenxiaoyu/develop

fix exist typo
This commit is contained in:
astaxie 2020-02-22 11:25:13 +08:00 committed by GitHub
commit 2410b364af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -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++ {

View File

@ -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)
}