TravelSchedulingValidate.php 535 B

1234567891011121314151617181920212223
  1. <?php
  2. namespace app\admin\validate\life;
  3. use support\Validate;
  4. class TravelSchedulingValidate extends Validate
  5. {
  6. protected $rule = [
  7. 'id' => 'require|integer',
  8. 'line_id' => 'require|integer',
  9. 'price' => 'require|float',
  10. 'original_price' => 'require|float',
  11. 'day' => 'require|date'
  12. ];
  13. protected $message = [];
  14. protected $scene = [
  15. 'add' => ['line_id', 'price', 'original_price', 'day'],
  16. 'update' => ['id', 'line_id', 'price', 'original_price', 'day']
  17. ];
  18. }