{"id":22989643,"url":"https://github.com/roxasshadow/birth_date_validator","last_synced_at":"2025-04-02T11:45:27.078Z","repository":{"id":21948557,"uuid":"25273068","full_name":"RoxasShadow/birth_date_validator","owner":"RoxasShadow","description":"Very minimal birth date validator to check if the user has the right age to sign in the website.","archived":false,"fork":false,"pushed_at":"2014-11-10T14:48:01.000Z","size":164,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-08T02:45:31.077Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RoxasShadow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-10-15T20:52:15.000Z","updated_at":"2014-10-16T13:38:52.000Z","dependencies_parsed_at":"2022-08-18T01:35:26.572Z","dependency_job_id":null,"html_url":"https://github.com/RoxasShadow/birth_date_validator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RoxasShadow%2Fbirth_date_validator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RoxasShadow%2Fbirth_date_validator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RoxasShadow%2Fbirth_date_validator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RoxasShadow%2Fbirth_date_validator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RoxasShadow","download_url":"https://codeload.github.com/RoxasShadow/birth_date_validator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246811248,"owners_count":20837745,"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-12-15T04:18:06.696Z","updated_at":"2025-04-02T11:45:27.058Z","avatar_url":"https://github.com/RoxasShadow.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Birth date validator\nMinimal birth date validator to check if the user has the right age to sign in the website.\n\n# Usage\nAdd to your Gemfile the following line.\n\n```ruby\ngem 'birth_date_validator'\n```\n\nThen add the following one to your model:\n\n```ruby\nvalidates :birth_date, birth_date: { at_least: 18.years.ago, message: 'come back when you will be older' }\nvalidates :birth_date, birth_date: { less_then: 18.years.ago }\nvalidates :birth_date, birth_date: { range: 18.years.ago..30.years.ago }\nBirthDateValidator.valid?(Date.parse('1995/01/24'), at_least: 18.years.ago)\n```\n\nFor further informations, have a look at the specs.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froxasshadow%2Fbirth_date_validator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froxasshadow%2Fbirth_date_validator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froxasshadow%2Fbirth_date_validator/lists"}