This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Struts and the fly likes Form bean validator Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Form bean validator" Watch "Form bean validator" New topic

Form bean validator

Sushil Jamsandekar

Joined: Aug 11, 2008
Posts: 15

I am new to struts validator. I am using following form to hold the data that user enters.

tableData holds list of objects of another bean MyTableBean which has following attributes

I want to validate above values through validation.xml file. I have written following code in xml file

Above code is not validating the input, even i am not getting proper JavaScript on the front end.
Please let me know if i am doing anything wrong.

SCJP 1.4
Preparing for SCWCD
David Newton

Joined: Sep 29, 2008
Posts: 12617

Please UseCodeTags; without them code is unreadable.

Are you using the <html:javascript> tag to emit the JavaScript? That said, I don't recall if the "mask" validator is available in JavaScript.
I agree. Here's the link:
subject: Form bean validator
It's not a secret anymore!