You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Pani R <pa...@lycos.com> on 2004/01/30 20:23:26 UTC
validatior framework - problem using mask
Hi All:
I have 3 validation for a field: "required", "minLength" & "all alphabets" (mask)
I get the following exception while validating:
[ERROR] Validator - -reflection: null <java.lang.reflect.InvocationTargetException>java.lang.reflect.InvocationTargetException: java.lang.NoClassDefFoundError: org/apache/oro/text/perl/Perl5Util
at org.apache.commons.validator.GenericValidator.matchRegexp(GenericValidator.java:107)
at org.apache.struts.validator.FieldChecks.validateMask(FieldChecks.java:271)
at java.lang.reflect.Method.invoke(Native Method)
If I remove the Mask part for this field in validation.xml, everything seem to work fine and my other 2 validations for the same field seem to work fine.
Am I missing anything in path settings relating to Validator Framework?
Thanks,
Pani
PS:
Extract form validation.xml
<field property="lastName" depends="required,mask,minlength">
<msg name="mask" key="errors.onlyalpha"/>
<arg0 key="ex.register.info.lName"/>
<arg1 name="minlength" key="${var:minlength}" resource="false"/>
<var>
<var-name>mask</var-name>
<var-value>^[a-zA-Z]*$</var-value>
</var>
<var>
<var-name>minlength</var-name>
<var-value>2</var-value>
</var>
</field>
____________________________________________________________
Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!
http://login.mail.lycos.com/r/referral?aid=27005
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
RE: validatior framework - problem using mask
Posted by Matthias Wessendorf <ma...@matthias-wessendorf.de>.
did you add
the oro-jar-file
from
http://jakarta.apache.org/oro/index.html
to
WEB-INF/lib ?
java.lang.NoClassDefFoundError
-->
org/apache/oro/text/perl/Perl5Uti
cheers,
-----Original Message-----
From: Pani R [mailto:pani_rd@lycos.com]
Sent: Friday, January 30, 2004 8:23 PM
To: struts-user@jakarta.apache.org
Subject: validatior framework - problem using mask
Importance: High
Hi All:
I have 3 validation for a field: "required", "minLength" & "all
alphabets" (mask)
I get the following exception while validating:
[ERROR] Validator - -reflection: null
<java.lang.reflect.InvocationTargetException>java.lang.reflect.Invocatio
nTargetException: java.lang.NoClassDefFoundError:
org/apache/oro/text/perl/Perl5Util
at
org.apache.commons.validator.GenericValidator.matchRegexp(GenericValidat
or.java:107)
at
org.apache.struts.validator.FieldChecks.validateMask(FieldChecks.java:27
1)
at java.lang.reflect.Method.invoke(Native Method)
If I remove the Mask part for this field in validation.xml, everything
seem to work fine and my other 2 validations for the same field seem to
work fine.
Am I missing anything in path settings relating to Validator Framework?
Thanks,
Pani
PS:
Extract form validation.xml
<field property="lastName" depends="required,mask,minlength">
<msg name="mask" key="errors.onlyalpha"/>
<arg0 key="ex.register.info.lName"/>
<arg1 name="minlength" key="${var:minlength}" resource="false"/> <var>
<var-name>mask</var-name>
<var-value>^[a-zA-Z]*$</var-value>
</var>
<var>
<var-name>minlength</var-name>
<var-value>2</var-value>
</var>
</field>
____________________________________________________________
Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!
http://login.mail.lycos.com/r/referral?aid=27005
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org