Predeposit.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 Predeposit extends Validate
  15. {
  16. protected $rule = [
  17. 'member_id' => 'require|number',
  18. 'amount' => 'require',
  19. 'operatetype' => 'require',
  20. 'pdc_amount' => 'require|min:0.01',
  21. 'password' => 'require'
  22. ];
  23. protected $message = [
  24. 'member_id.require' => '用户名必须存在',
  25. 'member_id.number' => '用户名错误',
  26. 'amount.require' => '金额为必填',
  27. 'operatetype.require' => '增减类型为必填',
  28. 'pdc_amount.require' => '提现金额为大于或者等于0.01的数字',
  29. 'pdc_amount.min' => '提现金额为大于或者等于0.01的数字',
  30. 'password.require' => '请输入支付密码'
  31. ];
  32. protected $scene = [
  33. 'pd_add' => ['member_id', 'amount', 'operatetype'],
  34. 'pd_cash_add' => ['pdc_amount', 'password'],
  35. ];
  36. }