{"action":"created","issue":{"url":"https://api.github.com/repos/jzaefferer/jquery-validation/issues/1876","repository_url":"https://api.github.com/repos/jzaefferer/jquery-validation","labels_url":"https://api.github.com/repos/jzaefferer/jquery-validation/issues/1876/labels{/name}","comments_url":"https://api.github.com/repos/jzaefferer/jquery-validation/issues/1876/comments","events_url":"https://api.github.com/repos/jzaefferer/jquery-validation/issues/1876/events","html_url":"https://github.com/jzaefferer/jquery-validation/issues/1876","id":182513942,"number":1876,"title":"MinLength accepts only white-space","user":{"login":"kodecount","id":22446865,"avatar_url":"https://avatars.githubusercontent.com/u/22446865?v=3","gravatar_id":"","url":"https://api.github.com/users/kodecount","html_url":"https://github.com/kodecount","followers_url":"https://api.github.com/users/kodecount/followers","following_url":"https://api.github.com/users/kodecount/following{/other_user}","gists_url":"https://api.github.com/users/kodecount/gists{/gist_id}","starred_url":"https://api.github.com/users/kodecount/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kodecount/subscriptions","organizations_url":"https://api.github.com/users/kodecount/orgs","repos_url":"https://api.github.com/users/kodecount/repos","events_url":"https://api.github.com/users/kodecount/events{/privacy}","received_events_url":"https://api.github.com/users/kodecount/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-12T12:34:36Z","updated_at":"2016-10-26T14:58:56Z","closed_at":null,"body":"## Subject of the issue\r\nMinLength accepts white-space without any characters\r\n\r\n### Your environment\r\n* version of `jquery-validate`: 1.15.1\r\n* which browser and its version: Chrome 53, Firefox 49, and IE 11\r\n\r\n### Other discussions\r\nhttps://github.com/wet-boew/wet-boew/issues/7557 \r\n\r\n### Steps to reproduce\r\nN/A\r\n\r\n### Expected behaviour\r\nMinLength should limit the minimum amount of characters.\r\n\r\n### Actual behaviour\r\nMinLength accepts all white-space without any characters.\r\n\r\n### Possible fix\r\nChange this line: https://github.com/jzaefferer/jquery-validation/blob/master/src/core.js#L1374\r\nTo: `var length = $.isArray( value ) ? $.trim(value).length : this.getLength( value, element );`\r\n\r\nChange this line: https://github.com/jzaefferer/jquery-validation/blob/master/src/core.js#L1031\r\nTo: `return  $.trim(value).length;`\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/jzaefferer/jquery-validation/issues/comments/256373939","html_url":"https://github.com/jzaefferer/jquery-validation/issues/1876#issuecomment-256373939","issue_url":"https://api.github.com/repos/jzaefferer/jquery-validation/issues/1876","id":256373939,"user":{"login":"kodecount","id":22446865,"avatar_url":"https://avatars.githubusercontent.com/u/22446865?v=3","gravatar_id":"","url":"https://api.github.com/users/kodecount","html_url":"https://github.com/kodecount","followers_url":"https://api.github.com/users/kodecount/followers","following_url":"https://api.github.com/users/kodecount/following{/other_user}","gists_url":"https://api.github.com/users/kodecount/gists{/gist_id}","starred_url":"https://api.github.com/users/kodecount/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kodecount/subscriptions","organizations_url":"https://api.github.com/users/kodecount/orgs","repos_url":"https://api.github.com/users/kodecount/repos","events_url":"https://api.github.com/users/kodecount/events{/privacy}","received_events_url":"https://api.github.com/users/kodecount/received_events","type":"User","site_admin":false},"created_at":"2016-10-26T14:58:55Z","updated_at":"2016-10-26T14:58:55Z","body":"This issue also applies to `required` method I believe at [Line 1324-1329](https://github.com/jzaefferer/jquery-validation/blob/master/src/core.js#L1324) adding a `$.trim` well fix this. @Arkni @staabm @AbdullahObaid @jzaefferer "}}
{"actor":{"display_login":"kodecount"}}