{"action":"created","issue":{"url":"https://api.github.com/repos/ansman/validate.js/issues/50","labels_url":"https://api.github.com/repos/ansman/validate.js/issues/50/labels{/name}","comments_url":"https://api.github.com/repos/ansman/validate.js/issues/50/comments","events_url":"https://api.github.com/repos/ansman/validate.js/issues/50/events","html_url":"https://github.com/ansman/validate.js/issues/50","id":72998802,"number":50,"title":"Consider to add type converters","user":{"login":"ivan-kleshnin","id":2128182,"avatar_url":"https://avatars.githubusercontent.com/u/2128182?v=3","gravatar_id":"","url":"https://api.github.com/users/ivan-kleshnin","html_url":"https://github.com/ivan-kleshnin","followers_url":"https://api.github.com/users/ivan-kleshnin/followers","following_url":"https://api.github.com/users/ivan-kleshnin/following{/other_user}","gists_url":"https://api.github.com/users/ivan-kleshnin/gists{/gist_id}","starred_url":"https://api.github.com/users/ivan-kleshnin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivan-kleshnin/subscriptions","organizations_url":"https://api.github.com/users/ivan-kleshnin/orgs","repos_url":"https://api.github.com/users/ivan-kleshnin/repos","events_url":"https://api.github.com/users/ivan-kleshnin/events{/privacy}","received_events_url":"https://api.github.com/users/ivan-kleshnin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":17,"created_at":"2015-05-04T11:40:40Z","updated_at":"2015-05-28T07:48:17Z","closed_at":null,"body":"I'm researching Joi alternatives and found this lib. I like the crossplatform aim you set for this project (Joi sucks for frontend having 2+Mib). Unfortunately there is little meaning in validation without type coercion. If value is checked to be an integer it should be possible to use this as an integer. \r\n\r\nNot validate as string, then apply type convertion manually, then use. It breaks the whole purpose of declarativeness in validation: you'll end up with the second deeply-nested declarative object with the same keys, and different values describing type convertion rules (semantically the same, as you've already said you want an integer)..."},"comment":{"url":"https://api.github.com/repos/ansman/validate.js/issues/comments/106215532","html_url":"https://github.com/ansman/validate.js/issues/50#issuecomment-106215532","issue_url":"https://api.github.com/repos/ansman/validate.js/issues/50","id":106215532,"user":{"login":"ivan-kleshnin","id":2128182,"avatar_url":"https://avatars.githubusercontent.com/u/2128182?v=3","gravatar_id":"","url":"https://api.github.com/users/ivan-kleshnin","html_url":"https://github.com/ivan-kleshnin","followers_url":"https://api.github.com/users/ivan-kleshnin/followers","following_url":"https://api.github.com/users/ivan-kleshnin/following{/other_user}","gists_url":"https://api.github.com/users/ivan-kleshnin/gists{/gist_id}","starred_url":"https://api.github.com/users/ivan-kleshnin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivan-kleshnin/subscriptions","organizations_url":"https://api.github.com/users/ivan-kleshnin/orgs","repos_url":"https://api.github.com/users/ivan-kleshnin/repos","events_url":"https://api.github.com/users/ivan-kleshnin/events{/privacy}","received_events_url":"https://api.github.com/users/ivan-kleshnin/received_events","type":"User","site_admin":false},"created_at":"2015-05-28T07:48:17Z","updated_at":"2015-05-28T07:48:17Z","body":"> Because without basic validators no one will use the bare framework. I mean pristine, required etc. validators. Maybe toLowerCase etc. parsers/formatters. It will be separate library but validate.js will be uses it by default.\r\n\r\nI'm for separate library as a dependency as well. \r\n\r\nAnyway it's good to see that people are mostly agree here. \r\nDetails are details. The subject we discuss is crossplatform so I think it's quite important talk."}}