{"action":"closed","issue":{"url":"https://api.github.com/repos/formvalidation/support/issues/171","labels_url":"https://api.github.com/repos/formvalidation/support/issues/171/labels{/name}","comments_url":"https://api.github.com/repos/formvalidation/support/issues/171/comments","events_url":"https://api.github.com/repos/formvalidation/support/issues/171/events","html_url":"https://github.com/formvalidation/support/issues/171","id":86075318,"number":171,"title":"Using maskedInput plugin problem","user":{"login":"SigalZ","id":7089214,"avatar_url":"https://avatars.githubusercontent.com/u/7089214?v=3","gravatar_id":"","url":"https://api.github.com/users/SigalZ","html_url":"https://github.com/SigalZ","followers_url":"https://api.github.com/users/SigalZ/followers","following_url":"https://api.github.com/users/SigalZ/following{/other_user}","gists_url":"https://api.github.com/users/SigalZ/gists{/gist_id}","starred_url":"https://api.github.com/users/SigalZ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SigalZ/subscriptions","organizations_url":"https://api.github.com/users/SigalZ/orgs","repos_url":"https://api.github.com/users/SigalZ/repos","events_url":"https://api.github.com/users/SigalZ/events{/privacy}","received_events_url":"https://api.github.com/users/SigalZ/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-08T08:11:13Z","updated_at":"2015-06-09T08:22:33Z","closed_at":"2015-06-09T08:22:33Z","body":"Hi,\r\n\r\nI am using maskedInput jquery plugin to mask a phone field.\r\n\r\nI am also using your mandatory icon addon.\r\n\r\nThe mandatory icon does not appear on the phone field and the field is not being validated.\r\n\r\nMy code:\r\n`$('#registerForm').formValidation('destroy')\r\n        .formValidation({\r\n            framework: 'bootstrap',\r\n            excluded: ':disabled',\r\n            icon: {\r\n                valid: 'glyphicon glyphicon-ok',\r\n                invalid: 'glyphicon glyphicon-remove',\r\n                validating: 'glyphicon glyphicon-refresh'\r\n            },\r\n            addOns: {\r\n                mandatoryIcon: {\r\n                    icon: 'glyphicon glyphicon-asterisk'\r\n                }\r\n            },\r\n            fields: {\r\n                customer_first_name: {\r\n                    validators: {\r\n                        notEmpty: { message: \"Please enter your first name\" }\r\n                    }\r\n                },\r\n                customer_surname: {\r\n                    validators: {\r\n                        notEmpty: { message: \"Please enter your surname\" }\r\n                    }\r\n                },\r\n                customer_email: {\r\n                    trigger: 'blur',\r\n                    validators: {\r\n                        notEmpty: { message: \"Please enter your email\" },\r\n                        emailAddress: { message: \"The email address you entered is not valid\"},\r\n                        duplicateEmail: { message: \"The email address you entered already exists\"}\r\n                    }\r\n                },\r\n                customer_phone: {\r\n                    validators: {\r\n                        notEmpty: { message: \"Please enter your phone number\" }\r\n                    }\r\n                },\r\n                customer_pass: {\r\n                    validators: {\r\n                        notEmpty: { message: \"Please enter a password\" },\r\n                        securePassword: { message: 'The password is not valid' }\r\n                    }\r\n                },\r\n                b_addr_line_1: {\r\n                    validators: {\r\n                        notEmpty: { message: \"Please enter your billing address line 1\" }\r\n                    }\r\n                },\r\n                b_city: {\r\n                    validators: {\r\n                        notEmpty: { message: \"Please enter your billing city\" }\r\n                    }\r\n                },\r\n                b_province: {\r\n                    validators: {\r\n                        callback: {\r\n                            message: 'Please select your billing province',\r\n\r\n                            callback: function(value, validator, $field) {\r\n                                if($field.val() == '') {\r\n                                    $('#bProvinceDiv').find($('.select2-selection--single')).css('border', '1px solid #a94442');\r\n                                } else {\r\n                                    $('#bProvinceDiv').find($('.select2-selection--single')).css('border', '1px solid #aaa');\r\n                                }\r\n\r\n                                return ($field.val() != '');\r\n                            }\r\n                        }\r\n                    }\r\n                },\r\n                b_post_code: {\r\n                    validators: {\r\n                        notEmpty: { message: \"Please enter your billing post code\" }\r\n                    }\r\n                },\r\n                s_addr_line_1: {\r\n                    validators: {\r\n                        notEmpty: { message: \"Please enter your shipping address line 1\" }\r\n                    }\r\n                },\r\n                s_city: {\r\n                    validators: {\r\n                        notEmpty: { message: \"Please enter your shipping city\" }\r\n                    }\r\n                },\r\n                s_province: {\r\n                    validators: {\r\n                        callback: {\r\n                            message: 'Please select your shipping province',\r\n\r\n                            callback: function(value, validator, $field) {\r\n                                if($field.val() == '') {\r\n                                    $('#sProvinceDiv').find($('.select2-selection--single')).css('border', '1px solid #a94442');\r\n                                } else {\r\n                                    $('#sProvinceDiv').find($('.select2-selection--single')).css('border', '1px solid #aaa');\r\n                                }\r\n\r\n                                return ($field.val() != '');\r\n                            }\r\n                        }\r\n                    }\r\n                },\r\n                s_post_code: {\r\n                    validators: {\r\n                        notEmpty: { message: \"Please enter your shipping post code\" }\r\n                    }\r\n                }\r\n            }\r\n        })\r\n        .find('[name=\"customer_phone\"]').mask('(999) 999-9999')\r\n        .on('success.form.fv', function(e) {\r\n            // Prevent form submission\r\n            e.preventDefault();\r\n\r\n            var $form = $(e.target);\r\n\r\n            // Use Ajax to submit form data\r\n            $form.ajaxSubmit({\r\n                url: '/modules/customers/ajax/register.ajax.php',\r\n                type: 'POST',\r\n                //data: $form.serialize(),\r\n                beforeSubmit: function() { alert('wy');\r\n                    $('.ajaxLoading').show();\r\n                },\r\n                success: function(result) {\r\n                    $('.ajaxLoading').hide();\r\n                    bootbox.dialog({\r\n                        message: \"Thank you for registering on our site.<br>An activation email has been sent to the email address you supplied.\",\r\n                        title: \"<span class='dialogSuccess'>Success</span>\",\r\n                        buttons: {\r\n                            exit: {\r\n                                label: \"Exit\",\r\n                                className: \"btn-success\",\r\n                                callback: function() {\r\n                                    $('#registerDiv').slideUp();\r\n                                    $('#login').slideDown();\r\n                                    $('#registerForm')[0].reset();\r\n                                    $('#registerForm').data('formValidation').resetForm();\r\n                                    $('.list').select2('val', '');\r\n                                }\r\n                            }\r\n                        }\r\n                    });\r\n                }\r\n            });\r\n        });`\r\n\r\nMy html:\r\n`<form name=\"registerForm\" method=\"post\" id=\"registerForm\">\r\n                    <div class=\"form-group\">\r\n                        <lable for=\"firstName\">First Name</lable>\r\n                        <input type=\"text\" name=\"customer_first_name\" id=\"firstName\" class=\"form-control\">\r\n                    </div>\r\n                    <div class=\"form-group\">\r\n                        <lable for=\"surname\">Surname</lable>\r\n                        <input type=\"text\" name=\"customer_surname\" id=\"surname\" class=\"form-control\">\r\n                    </div>\r\n                    <div class=\"form-group\">\r\n                        <lable for=\"customerEmail\">Email (Will be used for your login)</lable>\r\n                        <input type=\"text\" name=\"customer_email\" id=\"customerEmail\" class=\"form-control\">\r\n                    </div>\r\n                    <div class=\"form-group\">\r\n                        <lable for=\"phone\">Phone Number</lable>\r\n                        <input type=\"text\" name=\"customer_phone\" id=\"phone\" class=\"form-control phone\">\r\n                    </div>\r\n                    <div class=\"form-group\">\r\n                        <lable for=\"pass\">Password</lable>\r\n                        <input type=\"password\" name=\"customer_pass\" id=\"pass\" class=\"form-control\">\r\n                    </div>\r\nAddresses fields coming here.....\r\n`\r\n"}}