Ok I got it. You're probably right. The validation for the confirmation field it's related to the comparation with the original field.
Thanks 2012/9/28 Norbert Melzer <timmel...@gmail.com>: > Can't follow you… all the confirmation-fields you probably have, don't > need to be checked if they are present… That's throwing away CPU > cycles and therefore money! > > It is simple logic: > > When all validations pass on the original field they will also pass on > the corresponding confirmation field, as long as it has the same value > as the original field. So do all necessary validations on your > original field, check if it is identical with the confirmation field > and you are done… > > 2012/9/28 enrico stano <enrico...@gmail.com>: >> Hi, >> >> I was writing some tests when I discovered (god bless testing...) that my >> User model, that use Devise, doesn't validate the presence of the >> :password_confirmation field. >> >> I was expecting that adding :validatable to the Devise option would include >> the presence validation for this field too. >> >> Could any one please explain this behaviour? >> >> There is a better solution than simply adding that field to User model >> validation? >> >> thank you. >> >> bye, >> >> enricostn >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Talk" group. >> To post to this group, send email to rubyonrails-talk@googlegroups.com. >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscr...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msg/rubyonrails-talk/-/J_r2Hs92FgsJ. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > > -- · Enrico Stano · · twitter @enricostano · skype ocirneonats -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.