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

Support for per-field limits #15

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

Support for per-field limits #15

wants to merge 1 commit into from

Conversation

JamesSkemp
Copy link

If adding a counter to multiple fields, with each having a different maxlength, the limit on the last counter on the page will be used for all other counters. This stores the limit on the respective counter instead.

If adding a counter to multiple fields, with each having a different maxlength, the limit on the last counter on the page will be used for all other counters. This stores the limit on the respective counter instead.
@JamesSkemp
Copy link
Author

This is my first attempt at a pull request, so please be gentle :)

This is related to #10.

While it seemed to work, once I started typing into a field I found that the maximum length had been set to whatever was set on the last field on the page (options.limit is updated for each field, with the last having the final say).

This stores the length on the counter element itself instead, which is then checked.

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.

1 participant