• Resolved spcspectre

    (@spcspectre)


    I have a “phone” field in the Shipping section that is set to Required and field validation is set to “phone”, but if it get filled out partially, the transaction goes through without triggering an Error/Required Field Missing message. You can only input “2” for instance, and the transaction goes through with only number 2 filled in phone field…

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter spcspectre

    (@spcspectre)

    I have added a “length validation” to functions.php for that field. But why plugin’s core phone validation is not working?

    Plugin Support Tomasz WP Desk

    (@tomaszwp)

    Hello @spcspectre

    This is not validation from the plugin. This option runs the default WooCommerce validation that checks if the entered value is a number (no matter how long the number is). Please note that the same effect will be when our plugin is not active – then the phone number like 2 will also be validated as correct.

    If the validation is to check a specific format or length – then a custom validation is needed – as in the example below.
    Example

    It checks if the phone number has 9 or 10 characters.

    Thread Starter spcspectre

    (@spcspectre)

    I see.. Thanks for your reply..

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Field Validation not working’ is closed to new replies.