Details
-
Improvement
-
Status: Closed
-
Trivial
-
Resolution: Fixed
-
None
-
None
-
None
Description
Now, TextField supports length and required validation.
In addition, Click provides some components which extended TextField such as EmailField, CreditField.
But when I need other format validation, I must make new extended field components.
I think the component which supports regexp based validation is useful.
So I made this as new component named PatternField.
========
PatternField field = new PatternField("java");
field.setPattern(".+
.java");
========
To use this component, you have to add message entry to click-control.properties like following:
========
field-pattern-error=
format must be
{1}========