aspose file tools*
The moose likes Struts and the fly likes Struts Javascript Validation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts Javascript Validation" Watch "Struts Javascript Validation" New topic
Author

Struts Javascript Validation

Debojit Sinha
Ranch Hand

Joined: Mar 13, 2010
Posts: 66

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

Joined: Jan 30, 2011
Posts: 329

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


Have Fun with Java
little,little.. little by little makes a lot..
Debojit Sinha
Ranch Hand

Joined: Mar 13, 2010
Posts: 66

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

Joined: Jan 30, 2011
Posts: 329

Very well explained here

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

Debojit Sinha
Ranch Hand

Joined: Mar 13, 2010
Posts: 66

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!!!
 
 
subject: Struts Javascript Validation