• 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

Client Side Custom Validation

 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am having a form with some text fields. I am using predefined as well as my custom validations on this form.
I need the client side java script validations. So, I am using...

<html-el:messages id="msg" message="true"><li><font color="red"><c ut value="${msg}"/></font></li></html-el:messages>
<html-el:errors />
<html-el:form action="ItemTypeCRUD" onsubmit="return validateItemTypeCRUDForm(this);">

<html-el:javascript formName="ItemTypeCRUDForm"/>

</html-el:form>

Now, The problem is that all the predefined validations like "required,mask" are displayed as an "Alert" as is the case in javascript(Which I want). But my custom validations are getting printed on
the screen.
What should i do to display my custom validations as an "Alert".

Thanks in Advance.
 
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I do not use client side validations, but my understanding is that you would have to write JavaScript code to implement your custom validation rule and add that JavaScript to your validator-rules.xml file. Have you done this?

- Brent
 
dimpsonu arora
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Yes I have done this and my customize validation is working fine. The only problem is that it is printing message on the screen. But I want it to be appeared as an alert as is the case of normal javascript.
reply
    Bookmark Topic Watch Topic
  • New Topic