Membersecurity.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. namespace app\common\validate;
  3. use think\Validate;
  4. /**
  5. *
  6. *
  7. * ----------------------------------------------------------------------------
  8. *
  9. * 验证器
  10. */
  11. class Membersecurity extends Validate
  12. {
  13. protected $rule = [
  14. 'email' => 'email',
  15. 'password' => 'require',
  16. 'confirm_password' => 'require',
  17. 'mobile' => 'require',
  18. 'vcode' => 'require',
  19. ];
  20. protected $message = [
  21. 'email.email' => '请正确填写邮箱',
  22. 'password.require' => '请正确输入密码',
  23. 'confirm_password.require' => '请正确输入确认密码',
  24. 'mobile.require' => '请正确填写手机号',
  25. 'vcode.require' => '请正确填写手机验证码',
  26. ];
  27. protected $scene = [
  28. 'send_bind_email' => ['email'],
  29. 'modify_pwd' => ['password', 'confirm_password'],
  30. 'modify_paypwd' => ['password', 'confirm_password'],
  31. 'modify_mobile' => ['mobile', 'vcode'],
  32. 'send_modify_mobile' => ['mobile'],
  33. ];
  34. }