Browse Source

refactor(patient->register): update validation schema to ignore modality field

Modify registration information validation schema to exclude modality field
Remove all validation rules related to modality to prevent compilation errors
Ensure schema remains compatible with registration form after removal
sw 17 hours ago
parent
commit
d55286163a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/validation/patient/registerSchema.ts

+ 1 - 1
src/validation/patient/registerSchema.ts

@@ -9,7 +9,7 @@ import {
 import { RegisterInfo } from '@/API/patient/workActions';
 import { RegisterInfo } from '@/API/patient/workActions';
 import { Rule } from 'antd/es/form';
 import { Rule } from 'antd/es/form';
 
 
-type IgnoredKeys = 'views' | 'study_type';
+type IgnoredKeys = 'views' | 'study_type' | 'modality'; // 这些字段不在表单中填写
 const registerInfoSchema: Record<
 const registerInfoSchema: Record<
   keyof Omit<RegisterInfo, IgnoredKeys>,
   keyof Omit<RegisterInfo, IgnoredKeys>,
   z.ZodTypeAny
   z.ZodTypeAny