Memberconnect.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace app\common\validate;
  3. use think\Validate;
  4. /**
  5. * ============================================================================
  6. *
  7. * ============================================================================
  8. *
  9. * ----------------------------------------------------------------------------
  10. *
  11. * ============================================================================
  12. * 验证器
  13. */
  14. class Memberconnect extends Validate
  15. {
  16. protected $rule = [
  17. 'new_password' => 'require|length:6,20',
  18. 'confirm_password' => 'require|confirm:new_password',
  19. ];
  20. protected $message = [
  21. 'new_password.require' => '新密码为必填|密码长度必须为6-20之间',
  22. 'new_password.length' => '新密码为必填|密码长度必须为6-20之间',
  23. 'confirm_password.require' => '新密码与确认密码不相同,请从重新输入',
  24. 'confirm_password.confirm' => '新密码与确认密码不相同,请从重新输入',
  25. ];
  26. protected $scene = [
  27. 'qqunbind' => ['new_password', 'confirm_password'],
  28. 'sinaunbind' => ['new_password', 'confirm_password'],
  29. 'weixinunbind' => ['new_password', 'confirm_password'],
  30. ];
  31. }