This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts2 validation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts2 validation" Watch "Struts2 validation" New topic
Author

Struts2 validation

Honzak Troubak
Ranch Hand

Joined: Jan 11, 2013
Posts: 31
Please could anybody help me?

I am trying use Struts2 validation but in still doesn't work and I don't know why.

I have form



where I want validate an email.

I have action class ViewUser and XML validationFile ViewUser-validation.xml in same package.




ViewUser-validation.xml contains




Has anybody any idea why it doesn't work? When I put to email editBox not email value nothing happened.

I looks like when it doesn't know about validation file. Validation file should name MyActionClass-validation.xml I think it's ok.

I use Maven2 is possible problem could be there?

Thanks so much
Yogesh Lonkar
Ranch Hand

Joined: Jul 17, 2012
Posts: 94

your validation.xml contains invalid validation syntax it should be as follow.

you placed <field-validator> inside another <field-validator>


Learning some thing New Every Day
 
Don't get me started about those stupid light bulbs.
 
subject: Struts2 validation
 
Similar Threads
Struts2 & validation [SOLVED]
Struts2:Action-validation.xml
Struts2 validation
validation in struts2
struts2 - maven validation