constraintDescription property
A string that explains a constraint when the constraint is violated. For
example, without a constraint description, a parameter that has an allowed
pattern of
displays the following error message
when the user specifies an invalid value:A-Za-z0-9
+
Malformed input-Parameter MyParameter must match pattern
A-Za-z0-9
+
By adding a constraint description, such as must only contain letters (uppercase and lowercase) and numbers, you can display the following customized error message:
Malformed input-Parameter MyParameter must only contain uppercase and
lowercase letters and numbers.
Implementation
final String? constraintDescription;