Showing
2 changed files
with
2 additions
and
2 deletions
... | ... | @@ -60,7 +60,7 @@ |
60 | 60 | }); |
61 | 61 | |
62 | 62 | const validateRepeat = (value: StructRecord, valueList: StructRecord[]) => { |
63 | - return valueList.filter((item) => item.identifier === value.identifier).length >= 1; | |
63 | + return valueList.filter((item) => item.identifier === value.identifier).length > 1; | |
64 | 64 | }; |
65 | 65 | |
66 | 66 | const handleSubmit = async () => { | ... | ... |
... | ... | @@ -20,7 +20,7 @@ export const validateValueRange = (_rule, value: Record<'min' | 'max', number>, |
20 | 20 | return Promise.resolve(); |
21 | 21 | }; |
22 | 22 | |
23 | -export const validateJSON = (_rule, value: ModelOfMatterParams[], _callback) => { | |
23 | +export const validateJSON = (_rule, value = [] as ModelOfMatterParams[], _callback) => { | |
24 | 24 | if (value.length) { |
25 | 25 | return Promise.resolve(); |
26 | 26 | } | ... | ... |