当前位置: 首页>>代码示例>>PHP>>正文


PHP check_zip函数代码示例

本文整理汇总了PHP中check_zip函数的典型用法代码示例。如果您正苦于以下问题:PHP check_zip函数的具体用法?PHP check_zip怎么用?PHP check_zip使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了check_zip函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: trans

 }
 if ($customeradd['ssn'] != '' && !check_ssn($customeradd['ssn']) && !isset($customeradd['ssnwarning'])) {
     $error['ssn'] = trans('Incorrect Social Security Number! If you are sure you want to accept it, then click "Submit" again.');
     $customeradd['ssnwarning'] = 1;
 }
 if ($customeradd['icn'] != '' && !check_icn($customeradd['icn'])) {
     $error['icn'] = trans('Incorrect Identity Card Number!');
 }
 if ($customeradd['regon'] != '' && !check_regon($customeradd['regon'])) {
     $error['regon'] = trans('Incorrect Business Registration Number!');
 }
 if ($customeradd['zip'] != '' && !check_zip($customeradd['zip']) && !isset($customeradd['zipwarning'])) {
     $error['zip'] = trans('Incorrect ZIP code! If you are sure you want to accept it, then click "Submit" again.');
     $customeradd['zipwarning'] = 1;
 }
 if ($customeradd['post_zip'] != '' && !check_zip($customeradd['post_zip']) && !isset($customeradd['post_zipwarning'])) {
     $error['post_zip'] = trans('Incorrect ZIP code! If you are sure you want to accept it, then click "Submit" again.');
     $customeradd['post_zipwarning'] = 1;
 }
 if ($customeradd['pin'] == '') {
     $error['pin'] = trans('PIN code is required!');
 } elseif (!preg_match('/^[0-9]{4,6}$/', $customeradd['pin'])) {
     $error['pin'] = trans('Incorrect PIN code!');
 }
 foreach ($customeradd['uid'] as $idx => $val) {
     $val = trim($val);
     switch ($idx) {
         case IM_GG:
             if ($val != '' && !check_gg($val)) {
                 $error['gg'] = trans('Incorrect IM uin!');
             }
开发者ID:Akheon23,项目名称:lms,代码行数:31,代码来源:customeradd.php

示例2: trans

     $error['name'] = trans('Division long name is required!');
 }
 if ($division['shortname'] == '') {
     $error['shortname'] = trans('Division short name is required!');
 } elseif ($DB->GetOne('SELECT 1 FROM divisions WHERE shortname = ?', array($division['shortname']))) {
     $error['shortname'] = trans('Division with specified name already exists!');
 }
 if ($division['address'] == '') {
     $error['address'] = trans('Address is required!');
 }
 if ($division['city'] == '') {
     $error['city'] = trans('City is required!');
 }
 if ($division['zip'] == '') {
     $error['zip'] = trans('Zip code is required!');
 } elseif (!check_zip($division['zip'])) {
     $error['zip'] = trans('Incorrect ZIP code!');
 }
 if ($division['ten'] != '' && !check_ten($division['ten']) && !isset($division['tenwarning'])) {
     $error['ten'] = trans('Incorrect Tax Exempt Number! If you are sure you want to accept it, then click "Submit" again.');
     $division['tenwarning'] = 1;
 }
 if ($division['regon'] != '' && !check_regon($division['regon'])) {
     $error['regon'] = trans('Incorrect Business Registration Number!');
 }
 if ($division['account'] != '' && (strlen($division['account']) > 48 || !preg_match('/^([A-Z][A-Z])?[0-9]+$/', $division['account']))) {
     $error['account'] = trans('Wrong account number!');
 }
 if ($division['inv_paytime'] == '') {
     $division['inv_paytime'] = NULL;
 }
开发者ID:kornelek,项目名称:lms,代码行数:31,代码来源:divisionadd.php


注:本文中的check_zip函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。