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

Fixed Integer field constraints to match BigInteger implementation #59

Merged
merged 4 commits into from Feb 26, 2021

Conversation

jeffreymichaelis
Copy link
Contributor

Constraints for integer and number fields were not being checked properly

As the implementation of number field and integer field both use BigNumber and BigInteger which inherit from Number not Integer checking "instanceof Integer" would never be true causing constraint validation to always pass for these fields.

Updated unit tests to use the correct data type.

Also added year constraint check as it was not present.


Please preserve this line to notify @iSnow (lead of this repository)

@iSnow iSnow merged commit 3b15f47 into frictionlessdata:master Feb 26, 2021
@iSnow
Copy link
Contributor

iSnow commented Feb 26, 2021

Thanks for the PR, you are completely right - as I switched the datatype away from Integer, this one escaped my attention.

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.

None yet

2 participants