gcds-components icon indicating copy to clipboard operation
gcds-components copied to clipboard

GcdsInput maxlength attribute

Open UncleZen opened this issue 7 months ago • 1 comments

How can I limit the number of characters that the user can enter in a GcdsInput component?

The size attribute does visually make the input element smaller or larger depending on the value I assign to it, but it does not seem to impose any limitation on the maximum length of the input string.

UncleZen avatar May 02 '25 15:05 UncleZen

We are releasing an update to the input component to support additional attributes, one of which will be a min and max length. You can see the additional attributes here: https://developer.mozilla.org/en-US/docs/Web/HTML/Guides/Constraint_validation The update should be ready in the next month or so.

You are also able to do custom validation if needed for what is not covered, let us know if you need that and we can share some info.

adorayi avatar Jun 27 '25 18:06 adorayi