{"action":"created","issue":{"url":"https://api.github.com/repos/chriso/validator.js/issues/532","repository_url":"https://api.github.com/repos/chriso/validator.js","labels_url":"https://api.github.com/repos/chriso/validator.js/issues/532/labels{/name}","comments_url":"https://api.github.com/repos/chriso/validator.js/issues/532/comments","events_url":"https://api.github.com/repos/chriso/validator.js/issues/532/events","html_url":"https://github.com/chriso/validator.js/pull/532","id":157108349,"number":532,"title":"Allow prepended zeroes in toInt()","user":{"login":"theartoflogic","id":518312,"avatar_url":"https://avatars.githubusercontent.com/u/518312?v=3","gravatar_id":"","url":"https://api.github.com/users/theartoflogic","html_url":"https://github.com/theartoflogic","followers_url":"https://api.github.com/users/theartoflogic/followers","following_url":"https://api.github.com/users/theartoflogic/following{/other_user}","gists_url":"https://api.github.com/users/theartoflogic/gists{/gist_id}","starred_url":"https://api.github.com/users/theartoflogic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theartoflogic/subscriptions","organizations_url":"https://api.github.com/users/theartoflogic/orgs","repos_url":"https://api.github.com/users/theartoflogic/repos","events_url":"https://api.github.com/users/theartoflogic/events{/privacy}","received_events_url":"https://api.github.com/users/theartoflogic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2016-05-27T00:44:14Z","updated_at":"2016-05-28T01:12:46Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/chriso/validator.js/pulls/532","html_url":"https://github.com/chriso/validator.js/pull/532","diff_url":"https://github.com/chriso/validator.js/pull/532.diff","patch_url":"https://github.com/chriso/validator.js/pull/532.patch"},"body":"I updated the `isInt()` method so it treats numeric strings with prepended zeroes as valid integers. Since the `parseInt()` function in JavaScript properly parses zero-prepended strings, it would make sense that the `isInt()` function would support it as well.\r\n\r\nI'm curious if it might be better for the `isInt()` function to check for integer values by using `parseInt()` and checking whether it returns NaN. That way it's ensured that the `isInt()` method will always validate integers that can properly be parsed by `toInt()` (or rather, by `parseInt()` by proxy)."},"comment":{"url":"https://api.github.com/repos/chriso/validator.js/issues/comments/222282196","html_url":"https://github.com/chriso/validator.js/pull/532#issuecomment-222282196","issue_url":"https://api.github.com/repos/chriso/validator.js/issues/532","id":222282196,"user":{"login":"chriso","id":364903,"avatar_url":"https://avatars.githubusercontent.com/u/364903?v=3","gravatar_id":"","url":"https://api.github.com/users/chriso","html_url":"https://github.com/chriso","followers_url":"https://api.github.com/users/chriso/followers","following_url":"https://api.github.com/users/chriso/following{/other_user}","gists_url":"https://api.github.com/users/chriso/gists{/gist_id}","starred_url":"https://api.github.com/users/chriso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chriso/subscriptions","organizations_url":"https://api.github.com/users/chriso/orgs","repos_url":"https://api.github.com/users/chriso/repos","events_url":"https://api.github.com/users/chriso/events{/privacy}","received_events_url":"https://api.github.com/users/chriso/received_events","type":"User","site_admin":false},"created_at":"2016-05-28T01:12:46Z","updated_at":"2016-05-28T01:12:46Z","body":"Disabling the `no-control-regex` is fine for now, thanks."}}
{"actor":{"display_login":"chriso"}}