Hi all,
I'm trying to get a field "name", that should exist out of a domain name with at least one dot, validated.
This code from validation.xml should check the field on its (max)length, is "emptyness" and if it's correctly written. I tried to cover the needed spec by the regular expression (my first attempt). This expression should point out that the inserted
string has be at least xxx.xxx (for example javaranch.com
).
When
testing this I can insert wzzz without a dot or bla.yaba.daba.doodle without problems. Is my rule not valid or may also have other validation configuration probs?
I did enable validator plugin in my struts-config and the property "name" is also correctly spelled in the form bean and the
jsp. Any help would be appreciated.
Update:
The validation was not properly configured. Needed to extend the Form with ValidatorForm. Now I can validate. (But need to tweak the regular expression)
[ September 15, 2005: Message edited by: Ergin Er ]