• 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

validation.xml file

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I could not find validation.xml under the web-inf directory. Please help me . How should I get this file? I work on websphere studio 5.0
Thanks
 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
When you download struts 1.1 from the jakarta site you will get both
validation-rules.xml(dtd also) file and validation_1_1.dtd file Since validation.xml file is the application specific i think we have to create the file and plug into the config file
Here is a simple example for validation.xml file
-----------------------------------------
<form-validation>
<global>
<constant>
<constant-name>phone</constant-name>
<constant-value>^\(? (\d{3}\)?[-| ]?(\d{4}$</constant-value>
</constant>
</global>
<formset>
<form name="chkoutForm">
<field property="phone"
depends="required, mask">
<msg name="mask" key="phone.invalidFormat"/>
<arg0 key="registrationForm.firstname.displayname"/>
<var>
<var-name>ask</var-name>
<var-value>${phone}</var-value>
</var>
</field>
</formset>
</form-validation>
---------------------------------------------
Configure the corresonding DTD file into this
If you have any doubt just go through jakarta.apache .org site. it is very useful .
All the best try this
 
Author
Posts: 350
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In the struts install directory. Look for a directory called webapps. In web apps there is a starter war file called blank.war. Blank.war has the files you want under WEB-INF.
 
Note to self: don't get into a fist fight with a cactus. Command this tiny ad to do it:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic