|
12345678910111213141516171819202122232425262728 |
- <?php
-
-
- namespace crmeb\form\validate;
-
- use crmeb\form\FormValidate;
-
- /**
- * Class StrRules\validate
- */
- class StrRules extends BaseRules
- {
-
- /**
- * 手机号正则
- */
- const PHONE_NUMBER = '/(^(\d{3,4}-)?[0-9]{7,8}$)|(^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])[0-9]{8}$)/';
-
- /**
- * 设置类型
- * @return string
- */
- public static function getType(): string
- {
- return 'string';
- }
-
- }
|