Low commit activity in last 3 years
No release in over a year
Hints for validation.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.0.0
~> 1.5.2
>= 0
 Project Readme

Validation Hints

Delivers hints derived from the validation on a model.

Install

gem 'validation_hints'

Example

class Person < ActiveRecord::Base
  validates :name, :presence => true
  validates :password, :length => { :within => 1...5 }
end
Person.new.hints[:name] => ["can't be blank"]
Person.new.hints[:password] => ["must not be shorter than 1 characters", "must not be longer than 4 characters"]
Person.new.hints.messages => {:id=>[], :password=>["must not be shorter than 1 characters", "must not be longer than 4 characters"], :name => ["can't be blank"] }

Disclaimer

It's work in progress. validation_hints was for the most part derived from activerecord-3.2.3/lib/active_record/errors.rb