Skip to content

Commit

Permalink
[Nu-7557] Relax validation (#7558)
Browse files Browse the repository at this point in the history
  • Loading branch information
DeamonDev authored Feb 12, 2025
1 parent bb6aa6f commit 9ef252c
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ export default function InitialValue({ onChange, item, path, options, readOnly,
const emptyOption = { label: "", value: "" };
const optionsToDisplay: Option[] = [emptyOption, ...(options ?? []).map(({ label }) => ({ label, value: label }))];

const validationEnabled = Boolean(item.valueCompileTimeValidation);

return (
<FormControl>
<SettingLabelStyled>{t("fragment.initialValue", "Initial value:")}</SettingLabelStyled>
Expand All @@ -46,7 +48,7 @@ export default function InitialValue({ onChange, item, path, options, readOnly,
<DictParameterEditor
key={item.valueEditor.dictId}
fieldErrors={fieldErrors}
showValidation
showValidation={validationEnabled}
expressionObj={{ language: ExpressionLang.SpEL, expression: item?.initialValue?.expression }}
onValueChange={(value) => onChange(`${path}.initialValue`, { label: item.valueEditor.dictId, expression: value })}
param={{ editor: { dictId: item.valueEditor.dictId } }}
Expand All @@ -59,7 +61,7 @@ export default function InitialValue({ onChange, item, path, options, readOnly,
variableTypes={variableTypes}
readOnly={readOnly}
param={{ editor: { type: EditorType.RAW_PARAMETER_EDITOR } }}
showValidation
showValidation={validationEnabled}
fieldErrors={fieldErrors}
/>
)}
Expand Down

0 comments on commit 9ef252c

Please sign in to comment.