Detox
Detox is validator set that can apply to ActiveModel/ActiveRecord
Installation
Add this line to your application's Gemfile:
gem 'detox'
And then execute:
$ bundle
Or install it yourself as:
$ gem install detox
Usage
Look spec/test_class for sample usage
- Validators for attribute that has Array or Hash value
- ordering: validates continuous numbers
- possession: validates subset values
- values_uniqueness: validates unique values
- all_xxx: validates that all value are valid, by basic validators (xxx is presence, format etc.)
- any_xxx: validates that has valid value, by basic validators (xxx is presence, format etc.)
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Changelog
- v1.0.0 (2013-11-07 JST): First release
- v1.0.1 (2013-11-13 JST): Add ValuesUniquenessValidator
- v1.1.0 (2013-11-15 JST): Versioning rule changed