Fare.php 885 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2017 https://www.sapixx.com All rights reserved.
  4. * @license Licensed (http://www.apache.org/licenses/LICENSE-2.0).
  5. * @author pillar<ltmn@qq.com>
  6. * 运费验证
  7. */
  8. namespace app\fastshop\validate;
  9. use think\Validate;
  10. class Fare extends Validate{
  11. protected $rule = [
  12. 'first_weight' => 'require|number',
  13. 'first_price' => 'require|number',
  14. 'second_weight' => 'require|number',
  15. 'second_price' => 'require|number',
  16. ];
  17. protected $message = [
  18. 'first_weight' => '初始重量必须填写',
  19. 'first_price' => '初始运费必须填写',
  20. 'second_weight' => '每增加重量必须填写',
  21. 'second_price' => '增加运费必须填写',
  22. ];
  23. protected $scene = [
  24. 'save' => ['first_weight','first_price','second_weight','second_price'],
  25. ];
  26. }