https://github.com/pinzolo/detox
Validators for ActiveModel (RoR)
https://github.com/pinzolo/detox
Last synced: 4 days ago
JSON representation
Validators for ActiveModel (RoR)
- Host: GitHub
- URL: https://github.com/pinzolo/detox
- Owner: pinzolo
- License: mit
- Created: 2013-10-17T02:13:30.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-09-24T06:47:00.000Z (about 11 years ago)
- Last Synced: 2025-07-08T04:24:29.226Z (3 months ago)
- Language: Ruby
- Size: 398 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Detox
[](http://travis-ci.org/pinzolo/detox)
[](https://coveralls.io/r/pinzolo/detox)
[](https://codeclimate.com/github/pinzolo/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](https://github.com/pinzolo/detox/tree/master/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
1. Fork it
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 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