Skip to content

Commit 51aafd8

Browse files
Merge branch 'main' into FORMS-2094-Approver-Keyboard
2 parents 0920c03 + 44068ec commit 51aafd8

1 file changed

Lines changed: 25 additions & 14 deletions

File tree

components/src/components/Common/Advanced.edit.validation.ts

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,35 @@ import TextFieldEditValidation from 'formiojs/components/textfield/editForm/Text
33
import UseForCopy from './UseForCopy';
44

55
const kickbox = {
6-
type: 'panel',
7-
label: 'Kickbox',
8-
title: 'Kickbox',
9-
weight: 102,
10-
key: 'kickbox',
11-
components: [{
6+
type: 'panel',
7+
label: 'Kickbox',
8+
title: 'Kickbox',
9+
weight: 102,
10+
key: 'kickbox',
11+
components: [
12+
{
1213
type: 'checkbox',
1314
label: 'Enable',
1415
tooltip: 'Enable Kickbox validation for this email field.',
15-
description: 'Validate this email using the Kickbox email validation service.',
16-
key: 'kickbox.enabled'
17-
}]
18-
}
19-
20-
export default [kickbox, UseForCopy, ...ComponentEditValidation, ...TextFieldEditValidation];
21-
16+
description:
17+
'Validate this email using the Kickbox email validation service.',
18+
key: 'kickbox.enabled',
19+
},
20+
],
21+
};
2222

23+
// FORMS-2516: do not include 'unique' validation in the default edit validation
24+
// as it is not applicable and can cause confusion.
25+
const _defaultValidations = ComponentEditValidation.filter((x) => {
26+
return x.key != 'unique';
27+
});
2328

29+
export default [
30+
kickbox,
31+
UseForCopy,
32+
..._defaultValidations,
33+
...TextFieldEditValidation,
34+
];
2435

2536
// const neededposition = [
2637
// 'validate.isUseForCopy',
@@ -46,4 +57,4 @@ export default [kickbox, UseForCopy, ...ComponentEditValidation, ...TextFieldEdi
4657
// if(comp.key === posKey){newPosition.push(comp);}
4758
// });
4859
// })
49-
// export default newPosition;
60+
// export default newPosition;

0 commit comments

Comments
 (0)