Originally posted by majid nakit:
Hi,
I need to do validation in the actionForm, I want evoid duplication of user inputs :
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
ActionErrors errors = new ActionErrors();
List v = getVotes();
Vote vote;
for(int i = 0; i < v.size(); i++){
vote = (Vote)v.get(i);
in this for loop vote.getVote() bring all the input from textfields , how to test if these inputs are not duplicated
// if duplication
// errors.add(.....);
}
}
request.setAttribute("voteList", this.getVotes());
return errors;
}
Thanks, your help is appreciated.