{"action":"created","issue":{"url":"https://api.github.com/repos/dresende/node-enforce/issues/2","labels_url":"https://api.github.com/repos/dresende/node-enforce/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/dresende/node-enforce/issues/2/comments","events_url":"https://api.github.com/repos/dresende/node-enforce/issues/2/events","html_url":"https://github.com/dresende/node-enforce/issues/2","id":24218464,"number":2,"title":"ifType","user":{"login":"andrewjmead","id":2992789,"avatar_url":"https://avatars.githubusercontent.com/u/2992789?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewjmead","html_url":"https://github.com/andrewjmead","followers_url":"https://api.github.com/users/andrewjmead/followers","following_url":"https://api.github.com/users/andrewjmead/following{/other_user}","gists_url":"https://api.github.com/users/andrewjmead/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewjmead/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewjmead/subscriptions","organizations_url":"https://api.github.com/users/andrewjmead/orgs","repos_url":"https://api.github.com/users/andrewjmead/repos","events_url":"https://api.github.com/users/andrewjmead/events{/privacy}","received_events_url":"https://api.github.com/users/andrewjmead/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2013-12-13T00:01:22Z","updated_at":"2015-02-09T15:49:46Z","closed_at":"2014-04-26T21:52:03Z","body":"I'm using this because it's the provided validator for node-orm2.\r\n\r\nI'm trying to validate if an attribute is a `boolean`.\r\n\r\nI tried \r\n    \r\n    validations: {\r\n        setting_ticket_email_alerts: orm.enforce.notEmptyString().ifType('boolean')\r\n    }\r\n\r\nand\r\n\r\n    validations: {\r\n        setting_ticket_email_alerts: orm.enforce.ifType('boolean')\r\n    }\r\n\r\nNeither of these chunks work correctly.\r\n\r\nI saw that custom validations are supported, but could not find any examples or the api. Could you provide a link?"},"comment":{"url":"https://api.github.com/repos/dresende/node-enforce/issues/comments/73531494","html_url":"https://github.com/dresende/node-enforce/issues/2#issuecomment-73531494","issue_url":"https://api.github.com/repos/dresende/node-enforce/issues/2","id":73531494,"user":{"login":"elad","id":3621643,"avatar_url":"https://avatars.githubusercontent.com/u/3621643?v=3","gravatar_id":"","url":"https://api.github.com/users/elad","html_url":"https://github.com/elad","followers_url":"https://api.github.com/users/elad/followers","following_url":"https://api.github.com/users/elad/following{/other_user}","gists_url":"https://api.github.com/users/elad/gists{/gist_id}","starred_url":"https://api.github.com/users/elad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elad/subscriptions","organizations_url":"https://api.github.com/users/elad/orgs","repos_url":"https://api.github.com/users/elad/repos","events_url":"https://api.github.com/users/elad/events{/privacy}","received_events_url":"https://api.github.com/users/elad/received_events","type":"User","site_admin":false},"created_at":"2015-02-09T15:49:46Z","updated_at":"2015-02-09T15:49:46Z","body":"@andrewjmead it's all good - I tried using it for the same reason you stated above (it's used by node-orm2) but I very quickly decided against it. Thanks for your prompt replies!"}}