{"action":"created","issue":{"url":"https://api.github.com/repos/Bluefieldscom/intl-tel-input/issues/209","labels_url":"https://api.github.com/repos/Bluefieldscom/intl-tel-input/issues/209/labels{/name}","comments_url":"https://api.github.com/repos/Bluefieldscom/intl-tel-input/issues/209/comments","events_url":"https://api.github.com/repos/Bluefieldscom/intl-tel-input/issues/209/events","html_url":"https://github.com/Bluefieldscom/intl-tel-input/issues/209","id":69234455,"number":209,"title":"isValidNumber --  \"required\" attribute is not honored","user":{"login":"LiamK","id":360435,"avatar_url":"https://avatars.githubusercontent.com/u/360435?v=3","gravatar_id":"","url":"https://api.github.com/users/LiamK","html_url":"https://github.com/LiamK","followers_url":"https://api.github.com/users/LiamK/followers","following_url":"https://api.github.com/users/LiamK/following{/other_user}","gists_url":"https://api.github.com/users/LiamK/gists{/gist_id}","starred_url":"https://api.github.com/users/LiamK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LiamK/subscriptions","organizations_url":"https://api.github.com/users/LiamK/orgs","repos_url":"https://api.github.com/users/LiamK/repos","events_url":"https://api.github.com/users/LiamK/events{/privacy}","received_events_url":"https://api.github.com/users/LiamK/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Bluefieldscom/intl-tel-input/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-04-17T22:57:58Z","updated_at":"2015-04-25T05:10:43Z","closed_at":null,"body":"I have a phone field that I am using via angular, as shown below.\r\n\r\nThis phone field is *not* required.  However, form validation fails because the telInput.val() function returns \"+1\"  (in the case of a US country) when nothing has been entered in the field.  Subsequently, the isValidNumber() function checks the validity with intlTelInputUtils.isValidNumber() and that is not a valid number, so validation fails.\r\n\r\nSomewhere here shouldn't it be checking to see if the input field is required or not?\r\nIf the field is not required, and if nothing has been entered (discounting the \"+1\" country code) then the field should be valid. \r\nWhat I expect is that the field should be not required unless I add the \"required\" attribute.\r\n\r\nHelp, please!  If there is some workaround for this, or a suggested patch, I would love to find out.\r\n\r\n```\r\n<input international-phone-number\r\n                               preferred-countries=\"us\"\r\n                               default-country=\"us\"\r\n                               national-mode=\"false\"\r\n                               utils-script=\"/static/bower_components/intl-tel-input/lib/libphonenumber/build/utils.js\"\r\n                               responsive-dropdown=\"true\"\r\n                               class=\"form-control\"\r\n                               type=\"phone\"\r\n                               id=\"phone\"\r\n                               name=\"phone\"\r\n                               type=\"tel\"\r\n                               ng-required=\"false\"\r\n                               ng-model=\"main.contactFormParams.contact_phone\"\r\n                                />\r\n```"},"comment":{"url":"https://api.github.com/repos/Bluefieldscom/intl-tel-input/issues/comments/96132024","html_url":"https://github.com/Bluefieldscom/intl-tel-input/issues/209#issuecomment-96132024","issue_url":"https://api.github.com/repos/Bluefieldscom/intl-tel-input/issues/209","id":96132024,"user":{"login":"craigcampbell","id":270708,"avatar_url":"https://avatars.githubusercontent.com/u/270708?v=3","gravatar_id":"","url":"https://api.github.com/users/craigcampbell","html_url":"https://github.com/craigcampbell","followers_url":"https://api.github.com/users/craigcampbell/followers","following_url":"https://api.github.com/users/craigcampbell/following{/other_user}","gists_url":"https://api.github.com/users/craigcampbell/gists{/gist_id}","starred_url":"https://api.github.com/users/craigcampbell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craigcampbell/subscriptions","organizations_url":"https://api.github.com/users/craigcampbell/orgs","repos_url":"https://api.github.com/users/craigcampbell/repos","events_url":"https://api.github.com/users/craigcampbell/events{/privacy}","received_events_url":"https://api.github.com/users/craigcampbell/received_events","type":"User","site_admin":false},"created_at":"2015-04-25T05:10:43Z","updated_at":"2015-04-25T05:10:43Z","body":"@jackocnr My issue is I'm using most of the default settings and plugged it into my form. We're validating both client side and server side (spring) but for some reason it's still posting the '+' before the number. Now I have national mode set to false. My issue might be unrelated to spring capturing the '+', even when I val() the input field it returns just the int  I will probably have to fork and then change the JS from '+' to 0 I guess for a quick fix.  Thank you though."}}