You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

StrRules.php 462B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace crmeb\form\validate;
  3. use crmeb\form\FormValidate;
  4. /**
  5. * Class StrRules\validate
  6. */
  7. class StrRules extends BaseRules
  8. {
  9. /**
  10. * 手机号正则
  11. */
  12. 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}$)/';
  13. /**
  14. * 设置类型
  15. * @return string
  16. */
  17. public static function getType(): string
  18. {
  19. return 'string';
  20. }
  21. }