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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support disabling specific validation #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mtsmfm
Copy link

@mtsmfm mtsmfm commented Aug 12, 2015

Thank you for an awesome gem 馃専

I propose configuration to disable specific validation.
I want to disable only maxlength validation.

I'm not too sure about the API to disable.
Please give me feedback if you have ideas.

@mtsmfm
Copy link
Author

mtsmfm commented Aug 13, 2015

Woops, build failed 馃樀

But it seems that we can't see details about the build.
Could you enable Travis for this repository?

image

@mtsmfm mtsmfm force-pushed the disabling-specific-validation branch from e42c77c to 6edc2a6 Compare August 14, 2015 07:53
@mtsmfm mtsmfm force-pushed the disabling-specific-validation branch from 6edc2a6 to e0e77b2 Compare August 14, 2015 08:36
@mtsmfm
Copy link
Author

mtsmfm commented Aug 14, 2015

I noticed that we should support ruby 1.8 and I used 1.9 Hash syntax 馃槗
Fixed and force pushed 馃槃

@amatsuda
Copy link
Owner

Whoa! I wasn't aware of the Travis status... Thanks for letting me know that!

I haven't looked deeper into the code yet, but before going any further, I'd like to know your use case.
Why would you want to partially disable some validations in this way?

@mtsmfm
Copy link
Author

mtsmfm commented Aug 14, 2015

I want to disable maxlength only.
There are two reasons:

  1. It seems that HTML5 maxlength counts emoji (like 馃寢) as 2 characters.

    http://www.wufoo.com/html5/attributes/03-maxlength.html

  2. User may not notice that some chars are dropped when using copy & paste.


I implemented options for all validations for symmetry.
I don't have any situations for another validations.

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