diff --git a/frontend/packages/volto-form-block/src/schemaFormBlock/Wrappers/CheckboxGroupWrapper.jsx b/frontend/packages/volto-form-block/src/schemaFormBlock/Wrappers/CheckboxGroupWrapper.jsx index 79ddf9d..6a3c6a9 100644 --- a/frontend/packages/volto-form-block/src/schemaFormBlock/Wrappers/CheckboxGroupWrapper.jsx +++ b/frontend/packages/volto-form-block/src/schemaFormBlock/Wrappers/CheckboxGroupWrapper.jsx @@ -24,6 +24,7 @@ const CheckboxGroupWrapper = (props) => { title, description, required, + error, intl, } = props; @@ -101,6 +102,8 @@ const CheckboxGroupWrapper = (props) => { value: option[0], label: option[1], }))} + errorMessage={error ? error[0] : ''} + isInvalid={error} /> )} diff --git a/frontend/packages/volto-form-block/src/schemaFormBlock/Wrappers/CheckboxWrapper.jsx b/frontend/packages/volto-form-block/src/schemaFormBlock/Wrappers/CheckboxWrapper.jsx index 882adf3..ca90342 100644 --- a/frontend/packages/volto-form-block/src/schemaFormBlock/Wrappers/CheckboxWrapper.jsx +++ b/frontend/packages/volto-form-block/src/schemaFormBlock/Wrappers/CheckboxWrapper.jsx @@ -22,6 +22,7 @@ const CheckboxWrapper = (props) => { title, description, required, + error, intl, } = props; @@ -42,6 +43,8 @@ const CheckboxWrapper = (props) => { onChange={(value) => onChange(id, value === '' ? undefined : value)} ref={ref} onClick={() => onClick()} + errorMessage={error ? error[0] : ''} + isInvalid={error} /> ); diff --git a/frontend/packages/volto-form-block/src/schemaFormBlock/Wrappers/DatetimeWrapper.jsx b/frontend/packages/volto-form-block/src/schemaFormBlock/Wrappers/DatetimeWrapper.jsx index eec8864..56b5b21 100644 --- a/frontend/packages/volto-form-block/src/schemaFormBlock/Wrappers/DatetimeWrapper.jsx +++ b/frontend/packages/volto-form-block/src/schemaFormBlock/Wrappers/DatetimeWrapper.jsx @@ -30,6 +30,7 @@ const DatetimeWrapper = (props) => { description, widget, required, + error, intl, } = props; @@ -81,6 +82,8 @@ const DatetimeWrapper = (props) => { onChangeTime={onDateChange} ref={ref} onClick={() => onClick()} + errorMessage={error ? error[0] : ''} + isInvalid={error} /> ); diff --git a/frontend/packages/volto-form-block/src/schemaFormBlock/Wrappers/EmailWrapper.jsx b/frontend/packages/volto-form-block/src/schemaFormBlock/Wrappers/EmailWrapper.jsx index c8cde8f..48ed3e1 100644 --- a/frontend/packages/volto-form-block/src/schemaFormBlock/Wrappers/EmailWrapper.jsx +++ b/frontend/packages/volto-form-block/src/schemaFormBlock/Wrappers/EmailWrapper.jsx @@ -24,6 +24,7 @@ const EmailWrapper = (props) => { title, description, required, + error, intl, } = props; @@ -47,6 +48,8 @@ const EmailWrapper = (props) => { onClick={() => onClick()} minLength={minLength || null} maxLength={maxLength || null} + errorMessage={error ? error[0] : ''} + isInvalid={error} /> ); diff --git a/frontend/packages/volto-form-block/src/schemaFormBlock/Wrappers/FileWrapper.jsx b/frontend/packages/volto-form-block/src/schemaFormBlock/Wrappers/FileWrapper.jsx index eb53232..a7d572a 100644 --- a/frontend/packages/volto-form-block/src/schemaFormBlock/Wrappers/FileWrapper.jsx +++ b/frontend/packages/volto-form-block/src/schemaFormBlock/Wrappers/FileWrapper.jsx @@ -32,6 +32,7 @@ const FileWrapper = (props) => { accept, size, required, + error, intl, } = props; @@ -69,6 +70,8 @@ const FileWrapper = (props) => { onChange(id, null); }} ref={ref} + errorMessage={error ? error[0] : ''} + isInvalid={error} /> ); diff --git a/frontend/packages/volto-form-block/src/schemaFormBlock/Wrappers/HiddenWrapper.jsx b/frontend/packages/volto-form-block/src/schemaFormBlock/Wrappers/HiddenWrapper.jsx index 1e65941..47c1cf2 100644 --- a/frontend/packages/volto-form-block/src/schemaFormBlock/Wrappers/HiddenWrapper.jsx +++ b/frontend/packages/volto-form-block/src/schemaFormBlock/Wrappers/HiddenWrapper.jsx @@ -24,6 +24,7 @@ const HiddenWrapper = (props) => { description, onEdit, required, + error, intl, } = props; @@ -45,6 +46,8 @@ const HiddenWrapper = (props) => { onChange={(value) => onChange(id, value === '' ? undefined : value)} ref={ref} onClick={() => onClick()} + errorMessage={error ? error[0] : ''} + isInvalid={error} /> ) : ( diff --git a/frontend/packages/volto-form-block/src/schemaFormBlock/Wrappers/NumberWrapper.jsx b/frontend/packages/volto-form-block/src/schemaFormBlock/Wrappers/NumberWrapper.jsx index da55bf8..a90e152 100644 --- a/frontend/packages/volto-form-block/src/schemaFormBlock/Wrappers/NumberWrapper.jsx +++ b/frontend/packages/volto-form-block/src/schemaFormBlock/Wrappers/NumberWrapper.jsx @@ -23,6 +23,7 @@ const NumberWrapper = (props) => { title, description, required, + error, intl, } = props; @@ -44,6 +45,8 @@ const NumberWrapper = (props) => { placeholder={placeholder} onChange={(value) => onChange(id, value === '' ? undefined : value)} ref={ref} + errorMessage={error ? error[0] : ''} + isInvalid={error} onClick={() => onClick()} /> diff --git a/frontend/packages/volto-form-block/src/schemaFormBlock/Wrappers/RadioGroupWrapper.jsx b/frontend/packages/volto-form-block/src/schemaFormBlock/Wrappers/RadioGroupWrapper.jsx index f7d6a21..f514438 100644 --- a/frontend/packages/volto-form-block/src/schemaFormBlock/Wrappers/RadioGroupWrapper.jsx +++ b/frontend/packages/volto-form-block/src/schemaFormBlock/Wrappers/RadioGroupWrapper.jsx @@ -23,6 +23,7 @@ const RadioGroupWrapper = (props) => { title, description, required, + error, intl, } = props; @@ -47,6 +48,8 @@ const RadioGroupWrapper = (props) => { onChange={(value) => onChange(id, value === '' ? undefined : value)} ref={ref} onClick={() => onClick()} + errorMessage={error ? error[0] : ''} + isInvalid={error} > {options.map((option) => ( {option[1]} diff --git a/frontend/packages/volto-form-block/src/schemaFormBlock/Wrappers/SelectWrapper.jsx b/frontend/packages/volto-form-block/src/schemaFormBlock/Wrappers/SelectWrapper.jsx index bf9d192..7a6f258 100644 --- a/frontend/packages/volto-form-block/src/schemaFormBlock/Wrappers/SelectWrapper.jsx +++ b/frontend/packages/volto-form-block/src/schemaFormBlock/Wrappers/SelectWrapper.jsx @@ -27,6 +27,7 @@ const SelectWrapper = (props) => { title, description, required, + error, intl, } = props; @@ -53,6 +54,8 @@ const SelectWrapper = (props) => { placeholder={intl.formatMessage(messages.select)} onChange={(value) => onChange(id, value.value)} ref={ref} + errorMessage={error ? error[0] : ''} + isInvalid={error} onClick={() => onClick()} options={options.map((option) => ({ value: option[0], diff --git a/frontend/packages/volto-form-block/src/schemaFormBlock/Wrappers/TextWrapper.jsx b/frontend/packages/volto-form-block/src/schemaFormBlock/Wrappers/TextWrapper.jsx index 9a18038..2e79e2c 100644 --- a/frontend/packages/volto-form-block/src/schemaFormBlock/Wrappers/TextWrapper.jsx +++ b/frontend/packages/volto-form-block/src/schemaFormBlock/Wrappers/TextWrapper.jsx @@ -25,6 +25,7 @@ const TextWrapper = (props) => { title, description, required, + error, intl, } = props; @@ -48,6 +49,8 @@ const TextWrapper = (props) => { onClick={() => onClick()} minLength={minLength || null} maxLength={maxLength || null} + errorMessage={error ? error[0] : ''} + isInvalid={error} /> ); diff --git a/frontend/packages/volto-form-block/src/schemaFormBlock/Wrappers/TextareaWrapper.jsx b/frontend/packages/volto-form-block/src/schemaFormBlock/Wrappers/TextareaWrapper.jsx index 099b193..73842ad 100644 --- a/frontend/packages/volto-form-block/src/schemaFormBlock/Wrappers/TextareaWrapper.jsx +++ b/frontend/packages/volto-form-block/src/schemaFormBlock/Wrappers/TextareaWrapper.jsx @@ -25,6 +25,7 @@ const TextareaWrapper = (props) => { title, description, required, + error, intl, } = props; @@ -46,6 +47,8 @@ const TextareaWrapper = (props) => { onChange={(value) => onChange(id, value === '' ? undefined : value)} ref={ref} onClick={() => onClick()} + errorMessage={error ? error[0] : ''} + isInvalid={error} minLength={minLength || null} maxLength={maxLength || null} /> diff --git a/frontend/packages/volto-form-block/src/schemaFormBlock/Wrappers/TimeWrapper.jsx b/frontend/packages/volto-form-block/src/schemaFormBlock/Wrappers/TimeWrapper.jsx index 8ef4520..e8771f9 100644 --- a/frontend/packages/volto-form-block/src/schemaFormBlock/Wrappers/TimeWrapper.jsx +++ b/frontend/packages/volto-form-block/src/schemaFormBlock/Wrappers/TimeWrapper.jsx @@ -22,6 +22,7 @@ const TimeWrapper = (props) => { title, description, required, + error, intl, } = props; @@ -42,6 +43,8 @@ const TimeWrapper = (props) => { onChange={(value) => onChange(id, value === '' ? undefined : value)} ref={ref} onClick={() => onClick()} + errorMessage={error ? error[0] : ''} + isInvalid={error} /> );