Skip to content

Commit c6258bc

Browse files
committed
pattern error update
1 parent 38c772d commit c6258bc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

frontend/src/utils/formGeneration.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -806,6 +806,10 @@ const GeneratedInput = ({ schemaKey, props, formField, index }: GeneratedInputPr
806806
if (!selectFocused) setIsSelectVisible(false)
807807
}, [selectFocused])
808808

809+
if (_props.error?.includes('match pattern')) {
810+
_props.error = `${itemName} does not match allowed patterns`
811+
}
812+
809813
if (component) {
810814
// explicit component given
811815
formFieldComponent = React.cloneElement(component, {

0 commit comments

Comments
 (0)