8000 添加regex时报错,提示输入参数过多 · Issue #17 · gookit/validate · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
添加regex时报错,提示输入参数过多 #17
Closed
@hufuyu

Description

@hufuyu

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0