File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts Javascript Validation

 
Debojit Sinha
Ranch Hand
Posts: 66
Java Linux Oracle
  • 0
  • 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
  • 0
  • 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
  • 0
  • 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
  • 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
  • 0
  • 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!!!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic