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

Automatically pass maxlength param to character count templates #36

Open
matthew-shaw opened this issue Nov 24, 2021 · 0 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@matthew-shaw
Copy link
Member

Is your feature request related to a problem? Please describe.
When using the GovCharacterCount you have to set the length limit in both the WTForm field validator and pass the maxlength param to the template.

Describe the solution you'd like
Take the max length set in the validator and pass it as a default param to the template, so that developers don't have to set it twice, and risk missing or not changing one.

Describe alternatives you've considered
None other than the current approach

Additional context
The maxlength param must always be equal to the length.max validator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

1 participant