diff --git a/web/src/components/input/NameAndIdFields.tsx b/web/src/components/input/NameAndIdFields.tsx index f4d004cc4..eec2998a2 100644 --- a/web/src/components/input/NameAndIdFields.tsx +++ b/web/src/components/input/NameAndIdFields.tsx @@ -64,12 +64,25 @@ export default function NameAndIdFields({ const subscription = watch((value, { name }) => { if (name === nameField) { const processedId = effectiveProcessId(value[nameField] || ""); - setValue(idField, processedId as PathValue>); - trigger(idField); + setValue(idField, processedId as PathValue>, { + shouldValidate: false, + }); + // Only trigger validation if nameField has no errors + if (!errors[nameField]) { + trigger(idField); + } } }); return () => subscription.unsubscribe(); - }, [watch, setValue, trigger, nameField, idField, effectiveProcessId]); + }, [ + watch, + setValue, + trigger, + nameField, + idField, + effectiveProcessId, + errors, + ]); const idError = errors[idField]; useEffect(() => {