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

minLength not working with data attributes #28

Closed
yahyaerturan opened this issue Feb 12, 2014 · 1 comment
Closed

minLength not working with data attributes #28

yahyaerturan opened this issue Feb 12, 2014 · 1 comment

Comments

@yahyaerturan
Copy link

I can't make it run with data attributes.

<input type="text" name="nameserver1" id="nameserver1" placeholder="ns1" class="form-control force-selection" autocomplete="off"
                data-provide="typeahead"
                data-items="10"
                data-minLength="3" 
                data-source='["ns1.vayeshost.com","ns25.turkishost.com","ns1.natrohost.com"]'
@bassjobsen
Copy link
Owner

Thanks for posting your issue. You are right, the above don't work indeed.
I found this problem is related to jQuery's data() function, see also: http://bugs.jquery.com/ticket/9066 and http://stackoverflow.com/questions/7641551/have-jquery-ignore-case-in-attribute-data-names.

A Quick solution seems to use data-min-length which will be convert by jQuery's data() into minLength. I will consider to make all name lowercased to prevent this, but maybe there will be a good reason for this jQuery strategy?

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

2 participants