Sellermsg.php 662 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace app\common\validate;
  3. use think\Validate;
  4. /**
  5. *
  6. *
  7. * ----------------------------------------------------------------------------
  8. *
  9. * 验证器
  10. */
  11. class Sellermsg extends Validate
  12. {
  13. protected $rule = [
  14. 'storems_short_number' => 'regex:^1[0-9]{10}$',
  15. 'storems_mail_number' => 'email'
  16. ];
  17. protected $message = [
  18. 'storems_short_number.regex' => '请填写正确的手机号码',
  19. 'storems_mail_number.email' => '请填写正确的邮箱'
  20. ];
  21. protected $scene = [
  22. 'save_msg_setting' => ['storems_short_number', 'storems_mail_number'],
  23. ];
  24. }