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

When numeric range restriction is too narrow a type for field type unhelpful errors are issued #120

Open
rvesse opened this issue Jul 12, 2022 · 0 comments
Labels
bug Bug

Comments

@rvesse
Copy link
Owner

rvesse commented Jul 12, 2022

Discovered from $day job testing. When using a numeric range restriction eg IntegerRange on a field with a wider type eg long what looks like a valid value can be rejected with an unhelpful error:

Value for option 'MaxIdleTime' was given as '2' which is not in the acceptable range: value >= 1

This is because while the range restriction implementation copes with widening casts eg LongRange on an int field it doesn't cope with the inverse.

Implementation should be improved to issue a more specific error in this case since this is an option definition error

@rvesse rvesse added the bug Bug label Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug
Projects
None yet
Development

No branches or pull requests

1 participant