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 the qualifier allow_blank to validate_length_of #725

Conversation

maurogeorge
Copy link
Contributor

No description provided.

Rename allows_blank_value? to allow_blank_matches? to keep the same
conventiion name of the allow_nil_matches?
def allow_blank_matches?
if @options.key?(:allow_blank)
blank_values = ['', ' ', "\n", "\r", "\t", "\f"]
@options[:allow_blank] == blank_values.all? { |value| allows_value_of(value) }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [90/80]

@josephbridgwaterrowe
Copy link

josephbridgwaterrowe commented Dec 30, 2019

I'm in need of this feature, is there a reason it hasn't been merged yet?

UPDATE I see this it out of date now, would it be merged if it was bought up to date?

@guialbuk
Copy link
Collaborator

@josephbridgwaterrowe Sure. An update for this PR or a new PR for this feature would be welcome 🙂

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

Successfully merging this pull request may close these issues.

5 participants