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 chaining methods for numeric values #10

Open
jonnitto opened this issue Aug 13, 2020 · 0 comments
Open

Add chaining methods for numeric values #10

jonnitto opened this issue Aug 13, 2020 · 0 comments

Comments

@jonnitto
Copy link

jonnitto commented Aug 13, 2020

Currently, it is only possible with a regex to enable minimal and maximal values for numeric values. It would be great to have a syntax like that, as it is easier to read:

PropTypes.integer.min(1).max(10)
PropTypes.float.min(0).max(1)

Or just one method

PropTypes.float.min(1)
PropTypes.integer.max(10)
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

No branches or pull requests

1 participant