No commit activity in last 3 years
No release in over 3 years
The gem is supposed to contain validators that can be used across multiple projects.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 1.0.2
~> 1.7
>= 0.5.3
>= 0
>= 3.1
>= 2.14.0

Runtime

>= 0
< 4.3, >= 3.1
 Project Readme

Apress::Validators

Validators for ActiveRecord and ActiveModel.

Installation

Add this line to your application's Gemfile:

gem 'apress-validators'

And then execute:

$ bundle install

Available Validators

CountValidator - behaves similarly to LengthValidator, but designed only for associated records. Does not count records that are marked for destruction. Takes the same options as LengthValidator.

validates :image, :count => {:maximum => 24}
validates :image, :count => {:minimum => 2, message: 'Must have at lest 2 images'}
validates :image, :count => {:is => 3, :allow_nil => true}

Contributing

  1. Fork it ( https://github.com/[my-github-username]/apress-validators/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request