{"id":15601482,"url":"https://github.com/solnic/dm-validations-ext","last_synced_at":"2025-06-24T08:03:10.203Z","repository":{"id":62557292,"uuid":"899034","full_name":"solnic/dm-validations-ext","owner":"solnic","description":"Various additions to the dm-validations API","archived":false,"fork":false,"pushed_at":"2011-03-19T12:48:25.000Z","size":103,"stargazers_count":11,"open_issues_count":1,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-31T22:57:21.590Z","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/solnic.png","metadata":{"files":{"readme":"README.rdoc","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-09-09T16:30:16.000Z","updated_at":"2023-10-12T09:50:40.000Z","dependencies_parsed_at":"2022-11-03T06:15:41.718Z","dependency_job_id":null,"html_url":"https://github.com/solnic/dm-validations-ext","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/solnic/dm-validations-ext","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solnic%2Fdm-validations-ext","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solnic%2Fdm-validations-ext/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solnic%2Fdm-validations-ext/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solnic%2Fdm-validations-ext/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solnic","download_url":"https://codeload.github.com/solnic/dm-validations-ext/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solnic%2Fdm-validations-ext/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261632034,"owners_count":23187268,"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-10-03T02:21:54.164Z","updated_at":"2025-06-24T08:03:10.179Z","avatar_url":"https://github.com/solnic.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"= dm-validations-ext\n\nDataMapper plugin providing access to validation errors of associated parent and children objects. See the example below to get an idea on how it works.\n\n= Example\n\n  DataMapper.setup :default, \"sqlite::memory\"\n\n  class User\n    include DataMapper::Resource\n\n    property :id, Serial\n    property :name, String\n\n    belongs_to :group\n    has n, :roles\n  end\n\n  class Group\n    include DataMapper::Resource\n\n    property :id, Serial\n    property :name, String, :length =\u003e 10..255\n\n    has n, :users\n  end\n\n  class Role\n    include DataMapper::Resource\n\n    property :id, Serial\n    property :name, String, :length =\u003e 4..10\n\n    belongs_to :user\n  end\n\n  DataMapper.finalize\n  DataMapper.auto_migrate!\n\n  user  = User.new(:name =\u003e \"John\")\n  group = Group.new(:name =\u003e \"Too Short\")\n  role  = Role.new(:name =\u003e \"Way Too Long\")\n\n  user.group = group\n  user.roles \u003c\u003c role\n\n  user.save\n  # =\u003e false\n\n  user.errors[:group].inspect\n  # =\u003e \u003cDataMapper::Validations::ValidationErrors:0xa098a30 @resource=#\u003cGroup @id=nil @name=\"Too Short\"\u003e, @errors={:name=\u003e[\"Name must be between 10 and 255 characters long\"]}\u003e\n\n  user.errors[:roles].inspect\n  # =\u003e [#\u003cDataMapper::Validations::ValidationErrors:0xa0931ac @resource=#\u003cRole @id=nil @name=\"Way Too Long\" @user_id=nil\u003e, @errors={:name=\u003e[\"Name must be between 4 and 10 characters long\"], :user_id=\u003e[\"User must not be blank\"]}\u003e]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolnic%2Fdm-validations-ext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolnic%2Fdm-validations-ext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolnic%2Fdm-validations-ext/lists"}