SubjectValidate.php 856 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace app\admin\validate\medical;
  3. use think\Validate;
  4. class SubjectValidate extends Validate
  5. {
  6. protected $rule = [
  7. 'subject_id' => 'require',
  8. 'subject_pid' => 'require',
  9. 'subject_name' => 'require',
  10. 'subject_type' => 'require',
  11. ];
  12. protected $message = [
  13. 'subject_id.require' => '预约科目ID不能为空',
  14. 'subject_pid.require' => '父级ID不能为空',
  15. 'subject_name.require' => '预约科目名称不能为空',
  16. 'subject_type.require' => '门诊类型不能为空',
  17. ];
  18. //场景
  19. protected $scene = [
  20. 'add' => ['subject_pid','subject_name','subject_type'],
  21. 'info' => ['subject_id'],
  22. 'update' => ['subject_id']
  23. ];
  24. }