Membersecurity.php 1.3 KB

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