Open elvinchan opened 4 years ago
I met the same problem with you. Did you solve this problem? 你解决这个问题了吗?求解。
We are also having this issue? any update on this?
@elvinchan chan Add required to solve the problem.
type Input struct {
Keyword string `valid:"stringlength(3|64) , required"`
}
Hello guys! I forked this package cause owner disappeared. Hope, he will be back, but it would be easier to merge these changes back if he is back Link to my repo: create issue there and we'll discuss it.
We also have this problem.
Hi everyone: A struct defined like this:
What I expect is:
It is worked in the version v0.0.0-20190424111038-f61b66f89f4a But after updated to version v0.0.0-20200108200545-475eaeb16496, the empty string does not validate
I found it was the break change due to switch from
isEmptyValue
toisFieldSet
So I want to know, is the design of
stringlength
has changed ? Or just a bug ? If the design has changed, how do I implement the requirement "empty or specified length scope of string" ?Thanks a lot for any help !