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

Add step and offset parameters to the Number validator to allow discrete numeric ranges #102

Merged
merged 5 commits into from
Apr 14, 2023

Conversation

confluence
Copy link
Collaborator

This should make it possible to use the Number validator to validate discrete number ranges with a fixed step size and offset. It should not affect existing usage of the validator. Validation doesn't check type -- if 1 is a valid value, so is 1.0.

@confluence confluence marked this pull request as draft April 11, 2023 13:18
@confluence confluence marked this pull request as ready for review April 11, 2023 13:47
@confluence
Copy link
Collaborator Author

I have tested this in set_channel (which should have integer values, which we can now enforce), and it seems to be working.

(I have merged in the set_channel fix from #101 -- I'll merge dev in here after that's merged so that we have a clean diff.)

@confluence confluence self-assigned this Apr 12, 2023
@confluence confluence merged commit da72342 into dev Apr 14, 2023
@confluence confluence deleted the confluence/number_validate_step branch April 14, 2023 11:16
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 this pull request may close these issues.

3 participants