• 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

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,

am using validation.xml in my project which is based on struts & jsp
within validation.xml am providing the form name along with the property names whose value is to be checked.
following is the code:

<form name="dummyForm">
<field property="x" depends="customrequiredif">
<arg0 key="x is required"/>
<var>
<var-name>cFieldName</var-name>
<var-value>xValue</var-value>
</var>
<var>
<var-name>cFieldTest</var-name>
<var-value>equal</var-value>
</var>
<var>
<var-name>cFieldValue</var-name>
<var-value>NA</var-value>
</var>
</field>
</form>


am calling the validateCustomRequiredIf(formName) method in my javascript file
whose syntax is as shown:
em = validateCustomRequiredIf(aForm);
errMsg = errMsg + ((em.length > 0)? "\n" + em : "");


however am not able to get the alert message if the user does not provide value to the "x" field within my form.
the same scenario occurs in my other form but there am able to get the alert() message.
i have used the same syntax for both the forms in validation.xml & javascript files but the error message is shown only for one & not for other.........

please help!!!


 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Reshmi Kuttappan wrote:hi,


please provide some more detail about javascript method...
 
reply
    Bookmark Topic Watch Topic
  • New Topic