{"id":20672120,"url":"https://github.com/workarea-commerce/active_model-unvalidate","last_synced_at":"2026-06-22T18:31:42.315Z","repository":{"id":59150347,"uuid":"164127635","full_name":"workarea-commerce/active_model-unvalidate","owner":"workarea-commerce","description":"Provides APIs for removing ActiveModel::Validations validators from existing models","archived":false,"fork":false,"pushed_at":"2026-03-01T05:48:33.000Z","size":12,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":13,"default_branch":"master","last_synced_at":"2026-05-21T12:56:08.408Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/workarea-commerce.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-01-04T16:05:23.000Z","updated_at":"2020-05-27T12:13:46.000Z","dependencies_parsed_at":"2026-03-13T09:00:29.988Z","dependency_job_id":null,"html_url":"https://github.com/workarea-commerce/active_model-unvalidate","commit_stats":null,"previous_names":["weblinc/active_model-unvalidate"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/workarea-commerce/active_model-unvalidate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workarea-commerce%2Factive_model-unvalidate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workarea-commerce%2Factive_model-unvalidate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workarea-commerce%2Factive_model-unvalidate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workarea-commerce%2Factive_model-unvalidate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/workarea-commerce","download_url":"https://codeload.github.com/workarea-commerce/active_model-unvalidate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workarea-commerce%2Factive_model-unvalidate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34661702,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-22T02:00:06.391Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T20:32:06.366Z","updated_at":"2026-06-22T18:31:42.292Z","avatar_url":"https://github.com/workarea-commerce.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ActiveModel::Unvalidate\n\nIntended for working with models outside of your control, `ActiveModel::Unvalidate` provides methods for cleanly removing existing `ActiveModel::Validations` validators from existing models. This allows your project to loosen or change the validations to suite the needs of your application without the need to dig into the implmentation details of validations.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'active_model-unvalidate'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install active_model-unvalidate\n\n## Usage\n\nAssume a model exists that you cannot modify its original definition.\n\n```ruby\nclass Example\n  include ActiveModel::Validations\n\n  attr_accessor :name, :email\n\n  validates :name, presence: true, length: { minimum: 2 }\n  validates :email, presence: true\n\n  validate :real_email\n\n  private\n\n  def real_email\n    unless email =~ /[a-z]+@[a-z]+\\.[a-z]{1,5}/\n      errors.add(:email, 'is not formatted correctly.')\n    end\n  end\nend\n```\n\nWith `active_model-unvalidate` included in your bundle, the `Unvalidate` methods are automatically available to any class that includes `ActiveModel::Validations`. Here you can remove individual validations on specific fields or attributes, such as the length validator on `name`. You can also remove a method-base validation, such as the `real_email` validator.\n\n```ruby\nclass Example\n  unvalidates :name, :length\n  unvalidate :real_email\nend\n```\n\nYou can also remove all validations associated to a specific field/attribute.\n\n```ruby\nclass Example\n  unvalidates :name\n  unvalidates :email\n\n  unvalidate :real_email\nend\n```\n\nThis would remove all the validations provided in the example, allowing your application to either redefine new validation rules or leave the model without validations.\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo 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).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/weblinc/activemodel-unvalidate.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fworkarea-commerce%2Factive_model-unvalidate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fworkarea-commerce%2Factive_model-unvalidate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fworkarea-commerce%2Factive_model-unvalidate/lists"}