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

Range Validation #201

Closed
rkukuchka opened this issue Jul 9, 2017 · 3 comments
Closed

Range Validation #201

rkukuchka opened this issue Jul 9, 2017 · 3 comments

Comments

@rkukuchka
Copy link

Hello,
New to the project, looking at it for some personal coding. Is there any plan to add some sort of range validation to values? I'm doing some work where I know the expected values of a particular field will be between say 0-100, and I'd like some means to specify it in the ksy file. I was thinking something similar to JSON schema's minimum / maximum fields.

Thoughts?

@koczkatamas
Copy link
Member

Currently there is no such feature, but we are planning one. This is the related issue: #81

It maybe a good idea to describe some constraints (eg. range or regex, etc) declaratively instead of using a more generic guard field.

@arekbulski
Copy link
Member

Construct has a Check class that does that.
https://construct.readthedocs.io/en/latest/misc.html#check

@generalmimon
Copy link
Member

generalmimon commented Jul 26, 2021

This is resolved by #435, so I'm closing this issue.

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

No branches or pull requests

5 participants