Skip to content

Commit

Permalink
fix(validator): validator function support multiple parameters
Browse files Browse the repository at this point in the history
Change-Id: Ia23efb4b2e7df644d60b1d4a1f4f8c0b8162411c
  • Loading branch information
andeya committed May 30, 2019
1 parent 5421d68 commit 9143068
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion validator/func.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
// The go string types always are string.
func RegFunc(funcName string, fn func(args ...interface{}) bool, force ...bool) error {
return tagexpr.RegFunc(funcName, func(args ...interface{}) interface{} {
return fn(args[0])
return fn(args...)
}, force...)
}

Expand Down

0 comments on commit 9143068

Please sign in to comment.