Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Evan Herman

    (@eherman24)

    This sounds a bit outside the scope of the plugin. The way the plugin works is during plugin submission the phone number is validated via HTML5 form validation.

    If you need it to validate as the user is typing – I would recommend that you implement some form of custom JavaScript function that checks the form input value on .keyup();.

    I would recommend reading through some of the following resources:
    https://www.sitepoint.com/working-phone-numbers-javascript/
    https://www.designchemical.com/blog/index.php/jquery/form-validation-using-jquery-and-regular-expressions/
    https://jafty.com/blog/format-a-phone-number-with-javascript-during-input/

    We can consider implementing some sort of solution in future – but tried to avoid implementing JavaScript as much as possible as not all users will have it enabled on all browsers.

    Additionally, a tremendous number of themes and plugin are poorly written – and tend to cause some serious problems when a javascript error is found on the page – thus making our plugin un-usable and in turn causing users to leave us negative reviews – when in fact the root of the problem was the theme, page builder or some other plugin they had installed.

    We would rather not be blamed for poorly coded themes and plugins – so have attempted to make the plugin as universal as possible. Implementing a custom java script solution wouldn’t be all that hard.

    Thanks,
    Evan

    Thread Starter Andrija Kokanovic

    (@kokan87)

    Thanks for the links, I will check them out. Maybe you could consider this as a feature of your plugin and just give the users opportunity to turn that feature on or off if some problems appear, what do you think about that?

    Plugin Contributor Tracy Levesque

    (@liljimmi)

    ?????? YIKES, Inc. Co-Owner

    We will definitely keep it under consideration.

    Thank you!
    -Tracy

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Input mask for phone field’ is closed to new replies.