{"id":19474551,"url":"https://github.com/tomasc/mongoid_localized_presence_validator","last_synced_at":"2025-02-25T15:42:56.392Z","repository":{"id":56884357,"uuid":"144701805","full_name":"tomasc/mongoid_localized_presence_validator","owner":"tomasc","description":"Selectively validate presence in Monogid localized fields","archived":false,"fork":false,"pushed_at":"2020-01-16T19:36:39.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-08T21:43:23.791Z","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/tomasc.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-14T09:56:16.000Z","updated_at":"2020-01-16T19:36:25.000Z","dependencies_parsed_at":"2022-08-20T13:10:48.556Z","dependency_job_id":null,"html_url":"https://github.com/tomasc/mongoid_localized_presence_validator","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomasc%2Fmongoid_localized_presence_validator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomasc%2Fmongoid_localized_presence_validator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomasc%2Fmongoid_localized_presence_validator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomasc%2Fmongoid_localized_presence_validator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomasc","download_url":"https://codeload.github.com/tomasc/mongoid_localized_presence_validator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240697623,"owners_count":19843227,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-10T19:25:36.502Z","updated_at":"2025-02-25T15:42:56.355Z","avatar_url":"https://github.com/tomasc.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mongoid Localized Presence Validator\n\n[![Build Status](https://travis-ci.org/tomasc/mongoid_localized_presence_validator.svg)](https://travis-ci.org/tomasc/mongoid_localized_presence_validator) [![Gem Version](https://badge.fury.io/rb/mongoid_localized_presence_validator.svg)](http://badge.fury.io/rb/mongoid_localized_presence_validator) [![Coverage Status](https://img.shields.io/coveralls/tomasc/mongoid_localized_presence_validator.svg)](https://coveralls.io/r/tomasc/mongoid_localized_presence_validator)\n\nThis patch of the [mongoid](https://github.com/mongodb/mongoid) presence validator makes it easier to work with localized fields by adding the possibility to selectively validate the presence of certain locales or the app's default locale only.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'mongoid_localized_presence_validator'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install mongoid_localized_presence_validator\n\n## Usage\n\n```RUBY\nclass MyDoc\n  include Mongoid::Document\n  field :some_localized_field, type: String, localize: true\n\n  # Validate the presence of specific locales:\n  validates :some_localized_field, presence: %i[cs]\n\n  # Or just the default locale:\n  validates :some_localized_field, presence: :default_locale\nend\n```\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/tomasc/mongoid_localized_presence_validator. 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.\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%2Ftomasc%2Fmongoid_localized_presence_validator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomasc%2Fmongoid_localized_presence_validator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomasc%2Fmongoid_localized_presence_validator/lists"}