diff --git a/packages/simple-form-joy/src/components/form-control-wrapper/form-control-wrapper.tsx b/packages/simple-form-joy/src/components/form-control-wrapper/form-control-wrapper.tsx index 5ec78c8..14455c8 100644 --- a/packages/simple-form-joy/src/components/form-control-wrapper/form-control-wrapper.tsx +++ b/packages/simple-form-joy/src/components/form-control-wrapper/form-control-wrapper.tsx @@ -17,11 +17,13 @@ export const FormControlWrapper = (props: FormControlWrapperProps) => { const { effectiveReserveSpaceForValidationMessage } = useJoyFormUtils(reserveSpaceForValidationMessage); + const showErrorMessage = hasValue(errorMessage) || effectiveReserveSpaceForValidationMessage; + return ( {hasValue(label) && {label}} {children} - {errorMessage ?? (effectiveReserveSpaceForValidationMessage ? <>{"\u00A0"} : null)} + {showErrorMessage && {errorMessage ?? (effectiveReserveSpaceForValidationMessage ? <>{"\u00A0"} : null)}} ); };