Support » Plugin: Country & Phone Field Contact Form 7 » Validation error: Phone number must be numbers only

  • Resolved Linksbreaker

    (@linksbreaker)


    Hello, thank for the usefull plugin!

    I get an validation error message in phonetext field but I don’t know why ’cause I’m using only numbers.

    Could you help me to fix this issue please?
    Thanks in advance.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Momentarily I solved the problem by modifying the file /includes/phone-text.php line 106

    Changing:

    if (! is_int ($ value)) {
    $ result-> invalidate ($ tag, "Phone number must be numbers only.");
    }
    

    by:

    
    if (is_int ($ value)) {
    $ result-> invalidate ($ tag, "Phone number must be numbers only.");
    }
    

    But I know that it’s not a definitive or correct solution.

    Thanks again,
    LB

    I had the same issue. So I reverted back to the previouse version 2.0.7. Guess I we’ll have to wait for the update. 🙂

    Plugin Author Narinder Singh

    (@narinderbisht)

    Hi @butch182, @linksbreaker
    Thank you for letting me know about the issue.
    I really apologize for the inconvenience.
    It’s due to PHP is_int function. is_int function has some limitation.
    So I update the validation and replace to is_numeric function. Now it is working fine.
    Thank you for using this plugin.

    Regards
    Narinder.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.