Showing
2 changed files
with
2 additions
and
2 deletions
@@ -60,7 +60,7 @@ | @@ -60,7 +60,7 @@ | ||
60 | }); | 60 | }); |
61 | 61 | ||
62 | const validateRepeat = (value: StructRecord, valueList: StructRecord[]) => { | 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 | const handleSubmit = async () => { | 66 | const handleSubmit = async () => { |
@@ -20,7 +20,7 @@ export const validateValueRange = (_rule, value: Record<'min' | 'max', number>, | @@ -20,7 +20,7 @@ export const validateValueRange = (_rule, value: Record<'min' | 'max', number>, | ||
20 | return Promise.resolve(); | 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 | if (value.length) { | 24 | if (value.length) { |
25 | return Promise.resolve(); | 25 | return Promise.resolve(); |
26 | } | 26 | } |