Hello,
In struts 1, I can define the regex in one file like this
<constant>
<constant-name>alphaNumeric</constant-name>
<constant-value>[A-Za-z0-9]*</constant-value>
</constant>
and use like this in
<var>
<var-name>mask</var-name>
<var-value>${alphaNumeric}</var-value>
</var>
Could anyone tell me how to achieve this in Struts 2 ?
I've this in validation rule and I want to put the regex in another variable, I
tried used <constant> tag, but it not accept < >.
<field name="name">
<field-validator type="requiredstring">
<message key="@Lerror.required"/>
</field-validator>
<field-validator type="regex">
<param name="expression">
<![CDATA[[A-Za-z0-9]*]>
</param>
<message key="@Lerror.invalid"/>
</field-validator>
</field>
Thanks
LV