Note to self… August 31, 2007Posted by Phill in Struts.
Tags: required, Struts, validation
In Struts validation, if (for example) you want a field to be checked against a regex, and it must be specified, you need to use “required” as well as “mask”:
<field property="fieldName" depends="required,mask">
If you just use “mask” – like I did – the field won’t be required.
Yes, I know that was a stupid mistake, OK?