• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

invoking Validation.xml

 
Ranch Hand
Posts: 180
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear All,

I have set few checks in the validation.xml of my form, which
was previously in my ActionForm.
My ActionForm now extends ValidationForm.
But when i submit my form the validate method of the form is being called
but the checks in the validation.xml being not done.

I have registered by validation.xml in the struts config and
have my validate as set true.
Do i need to do anything else to have the validation done through
the validation.xml?.....
 
saurav sarkar
Ranch Hand
Posts: 180
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i guess some problem with my validation.xml because i seem to have
done everything right ...now the problem might occur in the validation.xml

here is the snippet of the file which validates the form

[code]

<form name="tempSeverityForm">
<field property="severityText" depends="required" >
<msg name="required" key="error.strSeverityText.required"/>

</field>
<field property="helpText" depends="maxlength,mask">
<msg name="maxlength" key="error.helpText.maxLength"/>

<msg name="mask" key="errors.specialChars"/>

<var>
<var-name>maxlength</var-name>
<var-value>499</var-value>
</var>

<var>
<var-name>mask</var-name>
<var-value>^[0-9a-zA-Z]*$</var-value>
</var>
</field>
</form>

[code]

where tempSeverityForm is the form which i am trying to validate and
all the properties matches with the html forms and strut form variables.

Please help
 
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Some things to check:

1) Do you mean your form extends ValidatorForm (not ValidationForm)?
2) Does your form implement the validate method? It should not or if it does it should call super.validate().
3) Does the name specified on your validation rule match up with the name on your action mapping?

- Brent
reply
    Bookmark Topic Watch Topic
  • New Topic