String length limit

hi,
i am new to A12 and have a question about String-Fields.
Is it possible to limit the number of characters the user type?
I tried it with min/max length and a pattern, but they all only effect the error message.
Thanks

grafik

Hi,
you’re right in that the modelling parameters that you’ve shown affect the validation of the user input.

A12 is not using standard HTML form validation and thus does not use HTML element attributes like e.g. maxLength on “text” inputs. Instead, validation & submit are handled in JavaScript.

A string field will usually be rendered as a standard HTML “text” input that is not limited in length.
The subsequent validation will consider the data modelling parameters that you used to give respective feedback to the user. This will ultimately force the user to adhere to your modelling constraints.

However, if you want the HTML input itself to never allow more than 11 characters (as in your example), you will programmatically have to customize the form engine input element/widget that is used for string inputs.

Ok, Thank you for this explanation.
So i need to contact my React Team to customize the Input field.
Did i get this right?
Thanks

Correct :slight_smile: