• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

struts 2: how to validate text fields in a collection

 
Vinny Menon
Ranch Hand
Posts: 62
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
greetings Fellow Ranchers,

i have a jsp in which i show a list of PersonVO in the iterate tag. the fields being : firstname,lastname,age. My Action class is PersonAction.java


how do i put the validation in PersonAction-validation.xml?and what will be the validation to iterate through the collection?
required validations being:
  • fname,lname should not be blank.
  • age should be numeric and non-zero


  • Thanks and Regards,
    VINNY M
     
    Mohana Rao Sv
    Ranch Hand
    Posts: 485
    Eclipse IDE Firefox Browser Linux
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Explore fieldError in Struts 2
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic