{"action":"created","issue":{"url":"https://api.github.com/repos/apotonick/reform/issues/202","labels_url":"https://api.github.com/repos/apotonick/reform/issues/202/labels{/name}","comments_url":"https://api.github.com/repos/apotonick/reform/issues/202/comments","events_url":"https://api.github.com/repos/apotonick/reform/issues/202/events","html_url":"https://github.com/apotonick/reform/issues/202","id":57431471,"number":202,"title":"Custom Validation","user":{"login":"tommy-dev","id":5927665,"avatar_url":"https://avatars.githubusercontent.com/u/5927665?v=3","gravatar_id":"","url":"https://api.github.com/users/tommy-dev","html_url":"https://github.com/tommy-dev","followers_url":"https://api.github.com/users/tommy-dev/followers","following_url":"https://api.github.com/users/tommy-dev/following{/other_user}","gists_url":"https://api.github.com/users/tommy-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/tommy-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tommy-dev/subscriptions","organizations_url":"https://api.github.com/users/tommy-dev/orgs","repos_url":"https://api.github.com/users/tommy-dev/repos","events_url":"https://api.github.com/users/tommy-dev/events{/privacy}","received_events_url":"https://api.github.com/users/tommy-dev/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-12T08:37:38Z","updated_at":"2015-02-15T23:35:18Z","closed_at":null,"body":"I have model with custom validation. I have a validator class and inside the class body I have:\r\n`validates_with MyValidator`\r\nHow to use this validator with form model?\r\nI put to the Form model:\r\n`extend ActiveModel::ModelValidations\r\n    copy_validations_from MyModel`\r\nBut this is not working at all. It returns:\r\n`ArgumentError - Unknown validator: 'MyValidator'`"},"comment":{"url":"https://api.github.com/repos/apotonick/reform/issues/comments/74443856","html_url":"https://github.com/apotonick/reform/issues/202#issuecomment-74443856","issue_url":"https://api.github.com/repos/apotonick/reform/issues/202","id":74443856,"user":{"login":"apotonick","id":10406,"avatar_url":"https://avatars.githubusercontent.com/u/10406?v=3","gravatar_id":"","url":"https://api.github.com/users/apotonick","html_url":"https://github.com/apotonick","followers_url":"https://api.github.com/users/apotonick/followers","following_url":"https://api.github.com/users/apotonick/following{/other_user}","gists_url":"https://api.github.com/users/apotonick/gists{/gist_id}","starred_url":"https://api.github.com/users/apotonick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apotonick/subscriptions","organizations_url":"https://api.github.com/users/apotonick/orgs","repos_url":"https://api.github.com/users/apotonick/repos","events_url":"https://api.github.com/users/apotonick/events{/privacy}","received_events_url":"https://api.github.com/users/apotonick/received_events","type":"User","site_admin":false},"created_at":"2015-02-15T23:35:17Z","updated_at":"2015-02-15T23:35:17Z","body":"Hi Tommy,\r\n\r\nyou don't need the `ModelValidations` module in your form. You have to make sure the `MyValidator` name sits in the right namespace: `ActiveModel::Validations::MyValidator`. This is not Reform's fault but an `ActiveModel::Validations` limitation."}}