• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Struts Javascript Validation

 
Ranch Hand
Posts: 66
Oracle Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm learning Struts 1.3, and I came across the validators framework, and I was wondering: Is it possible to have custom validations written in Java exposed in the client-side via html:javascript tag?

Thanks,
Debojit
 
Ranch Hand
Posts: 329
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, you can do good amount of customization using regular expressions in validation.xml
 
Debojit Sinha
Ranch Hand
Posts: 66
Oracle Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Shankar Tanikella wrote:Yes, you can do good amount of customization using regular expressions in validation.xml



Hi,
Thanks for your reply. Could you perhaps provide an example please.

Debojit
 
Shankar Tanikella
Ranch Hand
Posts: 329
Eclipse IDE Oracle Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Very well explained here

The validation "<var-value>" mentioned there is regex you can customize to your needs
usage example

 
Debojit Sinha
Ranch Hand
Posts: 66
Oracle Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Shankar Tanikella wrote:Very well explained here

The validation "<var-value>" mentioned there is regex you can customize to your needs
usage example


Thanks a lot!!!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!