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

regex validator refuses params with nil value #614

Merged
merged 1 commit into from
Apr 3, 2014
Merged

regex validator refuses params with nil value #614

merged 1 commit into from
Apr 3, 2014

Conversation

dm1try
Copy link
Member

@dm1try dm1try commented Apr 3, 2014

Fixes #608

@dm1try
Copy link
Member Author

dm1try commented Apr 3, 2014

@dblock , it's a small change, but could you take a look?

@dblock
Copy link
Member

dblock commented Apr 3, 2014

Looks legit. Merging.

dblock added a commit that referenced this pull request Apr 3, 2014
…alidator

regex validator refuses params with nil value
@dblock dblock merged commit 99c8468 into ruby-grape:master Apr 3, 2014
@dblock dblock mentioned this pull request Apr 3, 2014
@calfzhou
Copy link
Contributor

@dblock , why refuse nil or blank value params using regexp? Why not leverage allow_blank to refuse nil if you don't like it. If blank value is allowed, the blank value should not go through regexp validation. Otherwise, user need modify the regular expression to some complex form to support nil value. there is no way to make an endpoint support blank value if it has a regexp validation.

@dblock
Copy link
Member

dblock commented Mar 12, 2015

@calfzhou Yes yes, this should support allow_blank like everything else. Would appreciate an issue/test/PR.

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.

Regexp Validation
3 participants