Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Validation not working after clearing the form

Emili Calonge
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have a form that I use for creating and editing users. So the form fields are all getting their values from #{users.user.*}. When I want to create a user I set user = new User(); and when I want to edit a user I simple fetch the db ans set user to the user on the db.

All of the form fields are required, and most of them have a validator for length with a minimum of 3 characters. The form also has a cancel button, that clears the form (user = new User()).

So, if a user chooses to edit a user (all the form fields get filled with the user info correctly), and then cancels, and then selects to create a new user, the form fields don't validate. It doesn't validate even that the required fields are filled.

Does anyone have any clue on what may be happening?

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic