Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts Javascript Validation

 
Debojit Sinha
Ranch Hand
Posts: 66
Java Linux Oracle
  • 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
 
Shankar Tanikella
Ranch Hand
Posts: 329
Eclipse IDE Java Oracle
  • 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
Java Linux Oracle
  • 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 Java Oracle
  • 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
Java Linux Oracle
  • 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!!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic