Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

validation for negative values on range validator. #441

Open
joicemjoseph opened this issue May 6, 2021 · 1 comment · May be fixed by #442
Open

validation for negative values on range validator. #441

joicemjoseph opened this issue May 6, 2021 · 1 comment · May be fixed by #442

Comments

@joicemjoseph
Copy link

Feature Request

While validating negative integer values using range tag with ValidateStruct(), I received the following error message.
The following validator is invalid or can't be applied to the field: \"range(-1|50000)\"

I request to add support for -ve integer values for range tag.

Q A
New Feature yes
RFC no
BC Break no

Summary

If this feature is added, then we could validate -ve integer values.
the validation tag range(-1|50000) would work as expected.

If you can agree, I could work on it.

joicemjoseph added a commit to joicemjoseph/govalidator that referenced this issue May 6, 2021
@joicemjoseph joicemjoseph linked a pull request May 6, 2021 that will close this issue
@joicemjoseph joicemjoseph changed the title validation for negative values on range tag. validation for negative values on range validator. May 6, 2021
@sergeyglazyrindev
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants