https://github.com/drexed/lite-validators
Collection of ActiveModel/ActiveRecord validators
https://github.com/drexed/lite-validators
activemodel activerecord rails ruby validators
Last synced: 2 months ago
JSON representation
Collection of ActiveModel/ActiveRecord validators
- Host: GitHub
- URL: https://github.com/drexed/lite-validators
- Owner: drexed
- License: mit
- Created: 2019-06-25T19:41:36.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-19T01:39:28.000Z (about 3 years ago)
- Last Synced: 2025-10-09T15:13:57.153Z (6 months ago)
- Topics: activemodel, activerecord, rails, ruby, validators
- Language: Ruby
- Size: 202 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Lite::Validators
[](http://badge.fury.io/rb/lite-validators)
[](https://travis-ci.org/drexed/lite-validators)
Lite::Validators is a collection of validators useful for any Rails application.
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'lite-validators'
```
And then execute:
$ bundle
Or install it yourself as:
$ gem install lite-validators
## Table of Contents
* [Validators](#validators)
* [3rd-party](#3rd-party)
## Validators
* [Alpha](https://github.com/drexed/lite-validators/blob/master/docs/ALPHA.md)
* [Alpha numeric](https://github.com/drexed/lite-validators/blob/master/docs/ALPHA_NUMERIC.md)
* [Base64](https://github.com/drexed/lite-validators/blob/master/docs/BASE64.md)
* [Boolean](https://github.com/drexed/lite-validators/blob/master/docs/BOOLEAN.md)
* [Compare](https://github.com/drexed/lite-validators/blob/master/docs/COMPARE.md)
* [Coordinates](https://github.com/drexed/lite-validators/blob/master/docs/COORDINATE.md)
* [Credit card](https://github.com/drexed/lite-validators/blob/master/docs/CREDIT_CARD.md)
* [Csv](https://github.com/drexed/lite-validators/blob/master/docs/CSV.md)
* [Currency](https://github.com/drexed/lite-validators/blob/master/docs/CURRENCY.md)
* [CUSIP](https://github.com/drexed/lite-validators/blob/master/docs/CUSIP.md)
* [Email](https://github.com/drexed/lite-validators/blob/master/docs/EMAIL.md)
* [EIN](https://github.com/drexed/lite-validators/blob/master/docs/EIN.md)
* [File content Type](https://github.com/drexed/lite-validators/blob/master/docs/FILE_CONTENT_TYPE.md)
* [File extension](https://github.com/drexed/lite-validators/blob/master/docs/FILE_EXTENSION.md)
* [File size](https://github.com/drexed/lite-validators/blob/master/docs/FILE_SIZE.md)
* [HEX](https://github.com/drexed/lite-validators/blob/master/docs/HEX.md)
* [IMEI](https://github.com/drexed/lite-validators/blob/master/docs/IMEI.md)
* [IP address](https://github.com/drexed/lite-validators/blob/master/docs/IP_ADDRESS.md)
* [ISBN](https://github.com/drexed/lite-validators/blob/master/docs/ISBN.md)
* [ISIN](https://github.com/drexed/lite-validators/blob/master/docs/ISIN.md)
* [List](https://github.com/drexed/lite-validators/blob/master/docs/LIST.md)
* [MAC address](https://github.com/drexed/lite-validators/blob/master/docs/MAC.md)
* [Name](https://github.com/drexed/lite-validators/blob/master/docs/NAME.md)
* [Password](https://github.com/drexed/lite-validators/blob/master/docs/PASSWORD.md)
* [Phone number](https://github.com/drexed/lite-validators/blob/master/docs/PHONE_NUMBER.md)
* [Reference](https://github.com/drexed/lite-validators/blob/master/docs/REFERENCE.md)
* [SEDOL](https://github.com/drexed/lite-validators/blob/master/docs/SEDOL.md)
* [Slug](https://github.com/drexed/lite-validators/blob/master/docs/SLUG.md)
* [SSN](https://github.com/drexed/lite-validators/blob/master/docs/SSN.md)
* [Time zone](https://github.com/drexed/lite-validators/blob/master/docs/TIME_ZONE.md)
* [Type](https://github.com/drexed/lite-validators/blob/master/docs/TYPE.md)
* [URL](https://github.com/drexed/lite-validators/blob/master/docs/URL.md)
* [Username](https://github.com/drexed/lite-validators/blob/master/docs/USERNAME.md)
* [UUID](https://github.com/drexed/lite-validators/blob/master/docs/UUID.md)
## 3rd-party
The following are highly recommended 3rd-party validators to supplement your workflow:
* **DateTime:** Validates Timeliness - https://github.com/adzap/validates_timeliness
* **Existence:** Validates Existence - https://github.com/perfectline/validates_existence
* **Group:** Group Validations - https://github.com/adzap/grouped_validations
* **Overlap:** Validates Overlap - https://github.com/robinbortlik/validates_overlap
## Development
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/drexed/lite-validators. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
## Code of Conduct
Everyone interacting in the Lite::Validators project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/drexed/lite-validators/blob/master/CODE_OF_CONDUCT.md).