Closed
Description
v.StringRule("code",
required|regex:\d{4,6}
)
panic: validate: the number of parameters given does not match the required. validator 'regex', want 2, given 3
goroutine 1 [running]:
validate.panicf(...)
validate/helper.go:287
validate.(*funcMeta).checkArgNum(0xc0000c7dc0, 0x3, 0x13ab011, 0x5)
validate/validators.go:198 +0x1b6
validate.(*Rule).valueValidate(0xc0001ee000, 0x13a874a, 0x4, 0x13a8e15, 0x6, 0x13a8301, 0x1331a60, 0xc0000bae30, 0xc0000f22c0, 0x0)
validate/validate.go:166 +0x1c7
validate.(*Rule).Apply(0xc0001ee000, 0xc0000f22c0, 0x0)
validate/validate.go:83 +0x6c0
validate.(*Validation).Validate(0xc0000f22c0, 0x0, 0x0, 0x0, 0xd)
validate/validation.go:332 +0x10c
exit status 2