Predeposit.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. namespace app\common\validate;
  3. use think\Validate;
  4. /**
  5. *
  6. *
  7. * ----------------------------------------------------------------------------
  8. *
  9. * 验证器
  10. */
  11. class Predeposit extends Validate
  12. {
  13. protected $rule = [
  14. 'member_id' => 'require|number',
  15. 'amount' => 'require',
  16. 'operatetype' => 'require',
  17. 'pdc_amount' => 'require|min:0.01',
  18. 'password' => 'require'
  19. ];
  20. protected $message = [
  21. 'member_id.require' => '用户名必须存在',
  22. 'member_id.number' => '用户名错误',
  23. 'amount.require' => '金额为必填',
  24. 'operatetype.require' => '增减类型为必填',
  25. 'pdc_amount.require' => '提现金额为大于或者等于0.01的数字',
  26. 'pdc_amount.min' => '提现金额为大于或者等于0.01的数字',
  27. 'password.require' => '请输入支付密码'
  28. ];
  29. protected $scene = [
  30. 'pd_add' => ['member_id', 'amount', 'operatetype'],
  31. 'pd_cash_add' => ['pdc_amount', 'password'],
  32. ];
  33. }