File tree Expand file tree Collapse file tree 12 files changed +36
-0
lines changed
frontend/packages/volto-form-block/src/schemaFormBlock/Wrappers Expand file tree Collapse file tree 12 files changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ const CheckboxGroupWrapper = (props) => {
2424 title,
2525 description,
2626 required,
27+ error,
2728 intl,
2829 } = props ;
2930
@@ -101,6 +102,8 @@ const CheckboxGroupWrapper = (props) => {
101102 value : option [ 0 ] ,
102103 label : option [ 1 ] ,
103104 } ) ) }
105+ errorMessage = { error ? error [ 0 ] : '' }
106+ isInvalid = { error }
104107 />
105108 ) }
106109 </ FormFieldWrapper >
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ const CheckboxWrapper = (props) => {
2222 title,
2323 description,
2424 required,
25+ error,
2526 intl,
2627 } = props ;
2728
@@ -42,6 +43,8 @@ const CheckboxWrapper = (props) => {
4243 onChange = { ( value ) => onChange ( id , value === '' ? undefined : value ) }
4344 ref = { ref }
4445 onClick = { ( ) => onClick ( ) }
46+ errorMessage = { error ? error [ 0 ] : '' }
47+ isInvalid = { error }
4548 />
4649 </ FormFieldWrapper >
4750 ) ;
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ const DatetimeWrapper = (props) => {
3030 description,
3131 widget,
3232 required,
33+ error,
3334 intl,
3435 } = props ;
3536
@@ -81,6 +82,8 @@ const DatetimeWrapper = (props) => {
8182 onChangeTime = { onDateChange }
8283 ref = { ref }
8384 onClick = { ( ) => onClick ( ) }
85+ errorMessage = { error ? error [ 0 ] : '' }
86+ isInvalid = { error }
8487 />
8588 </ FormFieldWrapper >
8689 ) ;
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ const EmailWrapper = (props) => {
2424 title,
2525 description,
2626 required,
27+ error,
2728 intl,
2829 } = props ;
2930
@@ -47,6 +48,8 @@ const EmailWrapper = (props) => {
4748 onClick = { ( ) => onClick ( ) }
4849 minLength = { minLength || null }
4950 maxLength = { maxLength || null }
51+ errorMessage = { error ? error [ 0 ] : '' }
52+ isInvalid = { error }
5053 />
5154 </ FormFieldWrapper >
5255 ) ;
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ const FileWrapper = (props) => {
3232 accept,
3333 size,
3434 required,
35+ error,
3536 intl,
3637 } = props ;
3738
@@ -69,6 +70,8 @@ const FileWrapper = (props) => {
6970 onChange ( id , null ) ;
7071 } }
7172 ref = { ref }
73+ errorMessage = { error ? error [ 0 ] : '' }
74+ isInvalid = { error }
7275 />
7376 </ FormFieldWrapper >
7477 ) ;
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ const HiddenWrapper = (props) => {
2424 description,
2525 onEdit,
2626 required,
27+ error,
2728 intl,
2829 } = props ;
2930
@@ -45,6 +46,8 @@ const HiddenWrapper = (props) => {
4546 onChange = { ( value ) => onChange ( id , value === '' ? undefined : value ) }
4647 ref = { ref }
4748 onClick = { ( ) => onClick ( ) }
49+ errorMessage = { error ? error [ 0 ] : '' }
50+ isInvalid = { error }
4851 />
4952 </ FormFieldWrapper >
5053 ) : (
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ const NumberWrapper = (props) => {
2323 title,
2424 description,
2525 required,
26+ error,
2627 intl,
2728 } = props ;
2829
@@ -44,6 +45,8 @@ const NumberWrapper = (props) => {
4445 placeholder = { placeholder }
4546 onChange = { ( value ) => onChange ( id , value === '' ? undefined : value ) }
4647 ref = { ref }
48+ errorMessage = { error ? error [ 0 ] : '' }
49+ isInvalid = { error }
4750 onClick = { ( ) => onClick ( ) }
4851 />
4952 </ FormFieldWrapper >
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ const RadioGroupWrapper = (props) => {
2323 title,
2424 description,
2525 required,
26+ error,
2627 intl,
2728 } = props ;
2829
@@ -47,6 +48,8 @@ const RadioGroupWrapper = (props) => {
4748 onChange = { ( value ) => onChange ( id , value === '' ? undefined : value ) }
4849 ref = { ref }
4950 onClick = { ( ) => onClick ( ) }
51+ errorMessage = { error ? error [ 0 ] : '' }
52+ isInvalid = { error }
5053 >
5154 { options . map ( ( option ) => (
5255 < OptionWidget value = { option [ 0 ] } > { option [ 1 ] } </ OptionWidget >
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ const SelectWrapper = (props) => {
2727 title,
2828 description,
2929 required,
30+ error,
3031 intl,
3132 } = props ;
3233
@@ -53,6 +54,8 @@ const SelectWrapper = (props) => {
5354 placeholder = { intl . formatMessage ( messages . select ) }
5455 onChange = { ( value ) => onChange ( id , value . value ) }
5556 ref = { ref }
57+ errorMessage = { error ? error [ 0 ] : '' }
58+ isInvalid = { error }
5659 onClick = { ( ) => onClick ( ) }
5760 options = { options . map ( ( option ) => ( {
5861 value : option [ 0 ] ,
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ const TextWrapper = (props) => {
2525 title,
2626 description,
2727 required,
28+ error,
2829 intl,
2930 } = props ;
3031
@@ -48,6 +49,8 @@ const TextWrapper = (props) => {
4849 onClick = { ( ) => onClick ( ) }
4950 minLength = { minLength || null }
5051 maxLength = { maxLength || null }
52+ errorMessage = { error ? error [ 0 ] : '' }
53+ isInvalid = { error }
5154 />
5255 </ FormFieldWrapper >
5356 ) ;
You can’t perform that action at this time.
0 commit comments