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

Validators added: integer, string, boolean, in-range #26

Closed
wants to merge 1 commit into from

Conversation

mishadoff
Copy link
Contributor

Added four more validators.

integer - needed to avoid decimal values, which are passes number validator
string/boolean - if we get some untrusted data and it must match the type, also useful for api clients validation to skip and not process broken requests
in-range - member is not acceptable for range checking, because it is slow for wide ranged (-1e9, 1e9) and doesn't handle decimals (valid? {:rating 3.7} :rating [[member (range 5)]]) => false

Few tests added and doc updated as well.

@theleoborges
Copy link
Owner

Hi @mishadoff

I really appreciate you taking the time. It's been a very busy couple of weeks on my end so I apologise.

I'll do my best to get to this PR this week.

Thanks

@robinheghan
Copy link
Contributor

@LeonardoBorges when do you have the time to merge this in? I don't want to bother you if you are super busy, and I can wait until it suits you better, but I actually have use for these functions in my project now, so it would've been nice to see this merged :)

@theleoborges
Copy link
Owner

Hi @mishadoff ,

I finally worked through the other PR's and a few things got merged first so this PR doesn't merge cleanly any longer. Would mind rebasing and updating the PR?

I'll merge it once that's done a publish a point release.

Thanks

@stephenmuss
Copy link

@mishadoff @LeonardoBorges this looks useful. Any way the conflicts can be resolved and then this can be merged?

@theleoborges
Copy link
Owner

Sorry about the delay. Fixed on #33

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.

4 participants