{"action":"created","issue":{"url":"https://api.github.com/repos/offirgolan/ember-cp-validations/issues/386","repository_url":"https://api.github.com/repos/offirgolan/ember-cp-validations","labels_url":"https://api.github.com/repos/offirgolan/ember-cp-validations/issues/386/labels{/name}","comments_url":"https://api.github.com/repos/offirgolan/ember-cp-validations/issues/386/comments","events_url":"https://api.github.com/repos/offirgolan/ember-cp-validations/issues/386/events","html_url":"https://github.com/offirgolan/ember-cp-validations/issues/386","id":187452988,"number":386,"title":"validator extending format can't be found","user":{"login":"basz","id":143068,"avatar_url":"https://avatars.githubusercontent.com/u/143068?v=3","gravatar_id":"","url":"https://api.github.com/users/basz","html_url":"https://github.com/basz","followers_url":"https://api.github.com/users/basz/followers","following_url":"https://api.github.com/users/basz/following{/other_user}","gists_url":"https://api.github.com/users/basz/gists{/gist_id}","starred_url":"https://api.github.com/users/basz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basz/subscriptions","organizations_url":"https://api.github.com/users/basz/orgs","repos_url":"https://api.github.com/users/basz/repos","events_url":"https://api.github.com/users/basz/events{/privacy}","received_events_url":"https://api.github.com/users/basz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-11-04T22:36:07Z","updated_at":"2016-11-06T10:52:45Z","closed_at":null,"body":"I have a validator that suddenly (after upgrading) can't be found and I think it is because it extends the 'format' validator.\r\n\r\n```\r\nvendor.js:29700 Error: Assertion Failed: Validator not found of type: identity/email-address-is-registered.\r\n    at EmberError (vendor.js:29623)\r\n    at assert (vendor.js:17318)\r\n    at assert (vendor.js:29435)\r\n    at validate (vendor.js:124596)\r\n    at Class.validate (vendor.js:88749)\r\n    at Class.validate (plhw-client.js:33012)\r\n    at Class.superWrapper [as validate] (vendor.js:35345)\r\n    at vendor.js:90144\r\n    at vendor.js:90237\r\n    at tryCatch (vendor.js:61494)\r\n    at invokeCallback (vendor.js:61509)\r\n    at publish (vendor.js:61477)\r\n    at vendor.js:50957\r\n    at invoke (vendor.js:11530)\r\n    at Queue.flush (vendor.js:11594)\r\n    at DeferredActionQueues.flush (vendor.js:11402)\r\n    at Backburner.end (vendor.js:10716)\r\n    at Backburner.run (vendor.js:10838)\r\n    at vendor.js:11136\r\n```\r\n\r\n```\r\nimport FormatValidator from \"ember-cp-validations/validators/format\";\r\n\r\nexport default FormatValidator.extend({\r\n```\r\nDoes not work\r\n\r\n```\r\nimport BaseValidator from \"ember-cp-validations/validators/base\";\r\n\r\nexport default BaseValidator.extend({\r\n```\r\nDoes work... (but obviously with missing some 'format' functionality)\r\n\r\nMaybe because you now extends/use ember-validations (?)\r\n\r\n### Environment\r\n\r\n- Ember Version: 2.9.1\r\n- Ember CLI Version: 2.9.1\r\n- Ember CP Validations Version: 3.1.1\r\n### Steps to Reproduce\r\n\r\ncreate a custom validator that extends the 'format' validator.\r\nand import it into a model"},"comment":{"url":"https://api.github.com/repos/offirgolan/ember-cp-validations/issues/comments/258673261","html_url":"https://github.com/offirgolan/ember-cp-validations/issues/386#issuecomment-258673261","issue_url":"https://api.github.com/repos/offirgolan/ember-cp-validations/issues/386","id":258673261,"user":{"login":"basz","id":143068,"avatar_url":"https://avatars.githubusercontent.com/u/143068?v=3","gravatar_id":"","url":"https://api.github.com/users/basz","html_url":"https://github.com/basz","followers_url":"https://api.github.com/users/basz/followers","following_url":"https://api.github.com/users/basz/following{/other_user}","gists_url":"https://api.github.com/users/basz/gists{/gist_id}","starred_url":"https://api.github.com/users/basz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basz/subscriptions","organizations_url":"https://api.github.com/users/basz/orgs","repos_url":"https://api.github.com/users/basz/repos","events_url":"https://api.github.com/users/basz/events{/privacy}","received_events_url":"https://api.github.com/users/basz/received_events","type":"User","site_admin":false},"created_at":"2016-11-06T10:52:45Z","updated_at":"2016-11-06T10:52:45Z","body":"yes I can... so must be something with my class...\r\n\r\nbut this works (so it is able to locate the class)\r\n```\r\nimport BaseValidator from \"ember-cp-validations/validators/base\";\r\nexport default BaseValidator.extend({});\r\n```\r\n\r\nBut this gives an error...\r\n```\r\nimport FormatValidator from \"ember-cp-validations/validators/format\";\r\nexport default FormatValidator.extend({});\r\n```\r\nmy model\r\n```\r\nimport Ember from \"ember\";\r\nimport {validator, buildValidations} from \"ember-cp-validations\";\r\n\r\nconst Validations = buildValidations({\r\n  emailAddress: {\r\n    debounce: 280,\r\n    validators: [\r\n      validator('presence', {presence: true}),\r\n      // regular format validator works\r\n      // validator('format', {\r\n      //   regex: /^(?=.*\\d)(?=.*[a-z])(?=.*[A-Z]).{4,8}$/,\r\n      //   message: 'Password must include at least one upper case letter, one lower case letter, and a number'\r\n      // })\r\n\r\n      // extended format validator can't be found, if I extend the format validator, but works with the base validator\r\n      validator('identity/email-address-is-registered', {\r\n        allowBlank: false,\r\n        /* source http://emailregex.com */\r\n        regex: /^[-a-z0-9~!$%^&*_=+}{\\'?]+(\\.[-a-z0-9~!$%^&*_=+}{\\'?]+)*@([a-z0-9_][-a-z0-9_]*(\\.[-a-z0-9_]+)*\\.(aero|arpa|biz|com|coop|edu|gov|info|int|mil|museum|name|net|org|pro|travel|mobi|[a-z][a-z])|([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}))(:[0-9]{1,5})?$/i,\r\n        disabled: Ember.computed.empty('model.emailAddress')\r\n      })\r\n    ]\r\n  }\r\n});\r\n\r\nexport default Ember.Object.extend(Validations, {\r\n  emailAddress: ''\r\n});\r\n```\r\n\r\nidentity/email-address-is-registered is located in 'app/validators/identity/email-address-is-registered.js'"}}
{"actor":{"display_login":"basz"}}