What's New
Viewing 12 posts - 1 through 12 (of 12 total)
Viewing 12 posts - 1 through 12 (of 12 total)
You must be logged in to reply to this topic.
Tagged: persiannumber
Hi
Our users get error on postalcode with persian numbers.
۰۱۲۳۴۵۶۷۸۹۲۳۴
use this login info:
c09032009455@zibama.com
c09032009455@zibama.com
public static function isPostCode($postcode)
{
$fa = array('۰','۱','۲','۳','۴','۵','۶','۷','۸','۹');
$en = array('0','1','2','3','4','5','6','7','8','9');
$postcode= str_replace($fa, $en, $postcode);
return empty($postcode) || preg_match('/^[a-zA-Z 0-9-]+$/', $postcode);
}
I use this code to fix this.
You must be logged in to reply to this topic.