Skip to content

Automatically pass maxlength param to character count templates #36

@matthew-shaw

Description

@matthew-shaw

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.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions