StoreOrderValidate.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. namespace app\adminapi\validate\order;
  12. use think\Validate;
  13. /**
  14. *
  15. * Class StoreOrderValidate
  16. * @package app\adminapi\validates
  17. */
  18. class StoreOrderValidate extends Validate
  19. {
  20. protected $rule = [
  21. 'order_id' => ['require','length'=>'1,32','alphaNum'],
  22. 'total_price' => ['require','float'],
  23. 'total_postage' => ['require','float'],
  24. 'pay_price' => ['require','float'],
  25. 'pay_postage' => ['require','float'],
  26. 'gain_integral' => ['float'],
  27. ];
  28. protected $message = [
  29. 'order_id.require' => '400389',
  30. 'order_id.length' => '400390',
  31. 'order_id.alphaNum' => '400391',
  32. 'total_price.require' => '400392',
  33. 'total_price.float' => '400393',
  34. 'pay_price.require' => '400394',
  35. 'pay_price.float' => '400395',
  36. 'pay_postage.require' => '400396',
  37. 'pay_postage.float' => '400397',
  38. 'gain_integral.float' => '400398',
  39. ];
  40. protected $scene = [
  41. ];
  42. }