intridea/omniauth-identity — Issue #8: Show validation errors on registration form
Author: ryanb
Created: 2011-12-03 19:08:29+00:00
State: open

I noticed by default, if there's a validation error in the registration form, it brings the user back to the form without displaying any error messages as to what went wrong. There is an `on_failed_registration` option for just this scenario, but it requires you implement a rack endpoint (or Rails controller action) to handle the error and display a form. This takes away from the quick and easy appeal of this gem. It would be much better if the registration form had some validation handling by default.

Since different ORMs can handle validation errors differently, I suggest adding a simple "error_messages" method on the Identity model which simply returns an array of validation errors. Behind the scenes this can do whatever is necessary for that ORM, such as calling "errors.full_messages" in Active Record.