• arshadb

    (@arshadb)


    As a Persian website end-users must be able to fill up input boxes with any keyboard scripts, but due to data validation restrictions of some input boxes,such as phone number and zipcode this is not possible. And users face errors (i.e “Your Phone Number Is Not Valid”). Which I believe is generating by a Jquery script (though I’m not sure).
    What files and lines must be altered to prevent such these errors?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support RK a11n

    (@riaanknoetze)

    > As a Persian website end-users must be able to fill up input boxes with any keyboard scripts

    Why? Is this a necessity in that country?

    > What files and lines must be altered to prevent such these errors?

    Difficult to say – a lot depends on the plugins you have installed and whether there are any checkout form overrides. Best bet would be to get in touch with a persian web developer to look into this for you.

    > but due to data validation restrictions of some input boxes,such as phone number and zipcode this is not possible.

    These are often caused by the browser more than any script you’re running. Auto-population that’s powered by the browser often fails validation until the user manually focuses on the field, and then moves on.

    Thread Starter arshadb

    (@arshadb)

    1-As a matter of user-friendliness, end-users must be able to fill forms with any script type they wish and we must avoid forcing them to change their default keyboard.
    2-I didn’t install any third plugin to interrupt such procedure. it all backs to WooCommerce core files, I think. And Persian forums aren’t that much active on this matter.
    3-No, Is clear it has nothing to do with the browser, the error message generates by codes.

    Thread Starter arshadb

    (@arshadb)

    I found the code line, anybody to help?

    public static function is_phone( $phone )
    {
    	if ( 0 < strlen( trim( preg_replace( '/[\s\#0-9_\-\+\(\)]/', '', $phone ) ) ) ) {
    	return false;
    }
    • This reply was modified 8 years ago by arshadb.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Change data validation rules of checkout input boxes’ is closed to new replies.