我希望你能在Opencart代码中添加PHP电话号码验证,以下是示例代码:
我想在Opencart代码中添加PHP电话号码验证,以下是示例代码:
if(!filter_var($customer_email, FILTER_VALIDATE_EMAIL)) {
$errors[$pos++] = 'Email is not valid.';
}
if($customer_mobile=='') {
$errors[$pos++] = 'Please enter your Mobile.';
} /*elseif (strlen($customer_mobile) < 11 || !is_numeric($this->request->post['cell_number'])){
$errors[$pos++] = 'Mobile number should be 7 digits.';
}*/