• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to reset the field after validation using annotations(Struts 2)

 
harilal ithikkat
Ranch Hand
Posts: 221
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I was trying to do some email validation using annotation.
.
I wanna reset the errorful data from the field at the time of validation.


Can anyone help for the same?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Reset it to what?
 
harilal ithikkat
Ranch Hand
Posts: 221
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i wanna reset it to no value

 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have a "prepare" method that sets it to an empty string.

That's not a great idea, though; why would you want their text to disappear? I'd be annoyed if I had to type in my entire email address *again* just because I left out the "@" the first time.
 
harilal ithikkat
Ranch Hand
Posts: 221
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
that's right.
But its worth knowing.Thats why
Thank you man
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic