WellnessRecordValidate.php 1.0 KB

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace app\admin\validate\member;
  3. use support\Validate;
  4. class WellnessRecordValidate extends Validate
  5. {
  6. protected $rule = [
  7. 'wellness_record_id' => 'require|integer',
  8. 'join_wellness_record_member_id' => 'require',
  9. 'wellness_record_status|状态' => 'max:32',
  10. 'wellness_record_category|分类' => 'in:Archives,Examine,病例,Advice,Visiting,来访,其他',
  11. 'wellness_record_name|名称' => 'require',
  12. // 'wellness_record_datetime' => 'max:20',
  13. 'wellness_record_file_json|文件' => 'isJson',
  14. 'wellness_record_json' => 'isJson',
  15. 'wellness_record_extend_json' => 'isJson',
  16. ];
  17. protected $message = [];
  18. protected $scene = [
  19. 'add' => ['join_wellness_record_member_id', 'wellness_record_category', 'wellness_record_name', 'wellness_record_datetime'],
  20. 'update' => ['wellness_record_id', 'join_wellness_record_member_id', 'wellness_record_category', 'wellness_record_name', 'wellness_record_datetime'],
  21. 'info'=>['wellness_record_id'],
  22. ];
  23. }