{"action":"created","issue":{"url":"https://api.github.com/repos/Wixel/GUMP/issues/60","labels_url":"https://api.github.com/repos/Wixel/GUMP/issues/60/labels{/name}","comments_url":"https://api.github.com/repos/Wixel/GUMP/issues/60/comments","events_url":"https://api.github.com/repos/Wixel/GUMP/issues/60/events","html_url":"https://github.com/Wixel/GUMP/issues/60","id":49813069,"number":60,"title":"max_len poorly worded","user":{"login":"rwitchell","id":5378642,"avatar_url":"https://avatars.githubusercontent.com/u/5378642?v=3","gravatar_id":"","url":"https://api.github.com/users/rwitchell","html_url":"https://github.com/rwitchell","followers_url":"https://api.github.com/users/rwitchell/followers","following_url":"https://api.github.com/users/rwitchell/following{/other_user}","gists_url":"https://api.github.com/users/rwitchell/gists{/gist_id}","starred_url":"https://api.github.com/users/rwitchell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwitchell/subscriptions","organizations_url":"https://api.github.com/users/rwitchell/orgs","repos_url":"https://api.github.com/users/rwitchell/repos","events_url":"https://api.github.com/users/rwitchell/events{/privacy}","received_events_url":"https://api.github.com/users/rwitchell/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2014-11-23T03:24:03Z","updated_at":"2015-08-06T07:06:33Z","closed_at":"2015-08-06T07:06:33Z","body":"I feel the max_len needs to be re-written in the master version.\r\nFor example, a postcode is 4 digits, max_len,4\r\nThe output is: The postcode field needs to be shorter than 4 characters.\r\nWhich is incorrect, it needs to be 4 or less characters.\r\n\r\nEither, the wording needs to change to \"field needs to be $param or shorter in length\" \r\nor you need to increase the $param by one, as shown below.\r\n\r\n````\r\ncase 'validate_max_len':\r\n\t$param++;\r\n\tif($param == 1) {\r\n\t\t$resp[] = \"The <span class=\\\"$field_class\\\">$field</span> field needs to be shorter than $param character\";\r\n\t} else {\r\n\t\t$resp[] = \"The <span class=\\\"$field_class\\\">$field</span> field needs to be shorter than $param characters\";\r\n\t}\r\n\tbreak;\r\ncase 'validate_min_len':\r\n\t$param--;\r\n\tif($param == 1) {\r\n\t\t$resp[] = \"The <span class=\\\"$field_class\\\">$field</span> field needs to be longer than $param character\";\r\n\t} else {\r\n\t\t$resp[] = \"The <span class=\\\"$field_class\\\">$field</span> field needs to be longer than $param characters\";\r\n\t}\r\n\tbreak;\r\n````"},"comment":{"url":"https://api.github.com/repos/Wixel/GUMP/issues/comments/128272377","html_url":"https://github.com/Wixel/GUMP/issues/60#issuecomment-128272377","issue_url":"https://api.github.com/repos/Wixel/GUMP/issues/60","id":128272377,"user":{"login":"SeanNieuwoudt","id":77145,"avatar_url":"https://avatars.githubusercontent.com/u/77145?v=3","gravatar_id":"","url":"https://api.github.com/users/SeanNieuwoudt","html_url":"https://github.com/SeanNieuwoudt","followers_url":"https://api.github.com/users/SeanNieuwoudt/followers","following_url":"https://api.github.com/users/SeanNieuwoudt/following{/other_user}","gists_url":"https://api.github.com/users/SeanNieuwoudt/gists{/gist_id}","starred_url":"https://api.github.com/users/SeanNieuwoudt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SeanNieuwoudt/subscriptions","organizations_url":"https://api.github.com/users/SeanNieuwoudt/orgs","repos_url":"https://api.github.com/users/SeanNieuwoudt/repos","events_url":"https://api.github.com/users/SeanNieuwoudt/events{/privacy}","received_events_url":"https://api.github.com/users/SeanNieuwoudt/received_events","type":"User","site_admin":false},"created_at":"2015-08-06T07:06:33Z","updated_at":"2015-08-06T07:06:33Z","body":"I've updated this in the master branch, thanks for pointing it out! "}}