diff --git a/components/elements/index.js b/components/elements/index.js index 00ac5a20..d2c97843 100644 --- a/components/elements/index.js +++ b/components/elements/index.js @@ -656,17 +656,20 @@ const RenderDatePicker = ({ )} - {touched && error && ( - - - Error: - {" "} - {errorMsg} - - )} + {!custom.hasOwnProperty("showErrorBottom") + ? touched && + error && ( + + + Error: + {" "} + {errorMsg} + + ) + : ""} {/* {value}
@@ -693,6 +696,20 @@ const RenderDatePicker = ({ autoComplete="off" //value={!value ? null : moment(value, "DD/MM/yyyy")} /> + {custom.hasOwnProperty("showErrorBottom") + ? touched && + error && ( + + + Error: + {" "} + {error} + + ) + : ""} @@ -2214,54 +2231,56 @@ const RenderSubFields = ({ fields, meta: { touched, error }, ...custom }) => { return errors; }; + const required = (value) => + value ? undefined : t("newappeal:is-required-label"); return ( -