CollegeTeachingValidate.php 605 B

123456789101112131415161718192021222324
  1. <?php
  2. namespace app\admin\validate\life;
  3. use think\Validate;
  4. class CollegeTeachingValidate extends Validate
  5. {
  6. protected $rule = [
  7. 'teaching_id' => 'require|integer',
  8. 'teaching_name|名称' => 'require|chsDash',
  9. 'teaching_time' => 'date',
  10. 'teaching_courses_id' => 'require|integer',
  11. 'teaching_price' => 'float',
  12. 'teaching_status' => 'integer',
  13. 'teaching_is_del' => 'integer',
  14. ];
  15. protected $message = [];
  16. protected $scene = [
  17. 'add' => ['teaching_name', 'teaching_courses_id', 'teaching_price', 'teaching_status'],
  18. ];
  19. }