Find out why users are filling out your form incorrectly and get a validation error.
Ruby JavaScript CSS HTML
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
app update for rails 4 deprecations Jul 18, 2015
db/migrate update gem for uniqueness May 18, 2015
lib update for rails 4 deprecations Jul 18, 2015
.gitignore ignore .DS_Store Jul 25, 2012
Gemfile enable delete link Jul 24, 2012
Gemfile.lock version bump Aug 9, 2012
Rakefile initial commit... just a skeleton Jul 11, 2012
validation_issues.gemspec allow rails 4 May 18, 2015



The Reason for this project is simple. People are paying attention to A/B tests and user conversion without having all the details.

For example, Lets say you have a form that appears to have users drop out of your signup funnel. Normally the first stab at the problem is to create an A/B test without any data.

What if you knew 90% of the people that hit the form had a validation error on the first_name field. I'm betting that you might not need an AB test. If you did add an AB test you would focus on the first_name field.

This problem actually happened on a live production app I was working on. Turns out the first_name validated white space. If a user added a space at the end of their name the validation would fail. The user would receive a “Invalid First Name” message. They would look at their name and be confused and eventually leave. The solution was as simple as sanitizing the first_name before validations. If we had this tool the problem would have never lasted for so long.

Getting started

add this to your gemfile

gem 'validation_issues'

run the following in the command line

bundle install
rake validation_issues_engine:install:migrations
rake db:migrate

In your application_controller.rb add the following to have permissions to see the admin section:

class ApplicationController < ActionController::Base
  def has_validation_issues_admin_privileges
    # logic you want to make this true
    # Typically this will work
    current_user && current_user.admin?

In your model add 'acts_as_validation_issues'

class User < ActiveRecord::Base
  # add this line

Now the only you need to do is this in your controller:

def create
  user = => '', :last_name => 'Good Last Name')
    # do something
    # do something else(like render the form again)

you pass the form's name into the user.log_validation_issue! & log_successful_validation! method. This way if you have an AB test you can see the difference in the results.

Navigate to the admin at this url:


Happy Coding. If you have any problems feel free to ask me directly, David Henner