|
1 | | -import { fieldTextSchema } from './fieldTextSchema' |
2 | | -import { fieldSelectSchema } from './fieldSelectSchema' |
3 | | -import { fieldDateSchema } from './fieldDateSchema' |
4 | | -import { fieldImageSchema } from './fieldImageSchema' |
5 | | -import { fieldNumberSchema } from './fieldNumberSchema' |
6 | | -import { fieldCodeSchema } from './fieldCodeSchema' |
7 | | -import { fieldSignatureSchema } from './fieldSignatureSchema' |
8 | | -import { filedGPSSchema } from './filedGPSSchema' |
9 | | -import { dynamicListFieldSchema } from './dynamicListFieldSchema' |
| 1 | +import * as Yup from 'yup' |
| 2 | +import { fieldTextSchema } from './fieldTextSchema'; |
| 3 | +import { fieldSelectSchema } from './fieldSelectSchema'; |
| 4 | +import { fieldDateSchema } from './fieldDateSchema'; |
| 5 | +import { fieldImageSchema } from './fieldImageSchema'; |
| 6 | +import { fieldNumberSchema } from './fieldNumberSchema'; |
| 7 | +import { fieldCodeSchema } from './fieldCodeSchema'; |
| 8 | +import { fieldSignatureSchema } from './fieldSignatureSchema'; |
| 9 | +import { filedGPSSchema } from './filedGPSSchema'; |
| 10 | +import { dynamicListFieldSchema } from './dynamicListFieldSchema'; |
10 | 11 |
|
11 | 12 | export const fieldSchema = (field) => { |
12 | 13 | switch (field.fieldType) { |
@@ -35,6 +36,6 @@ export const fieldSchema = (field) => { |
35 | 36 | case 'dynamicList': |
36 | 37 | return dynamicListFieldSchema(field) |
37 | 38 | default: |
38 | | - return {} |
| 39 | + return { schema: Yup.object().shape({}).noUnknown() }; |
39 | 40 | } |
40 | 41 | } |
0 commit comments