diff --git a/src/lib/elements/ErrorMessage.js b/src/lib/elements/ErrorMessage.js index 8dcc531a..1e549972 100644 --- a/src/lib/elements/ErrorMessage.js +++ b/src/lib/elements/ErrorMessage.js @@ -16,8 +16,12 @@ const FieldErrorList = ({ fieldErrors }) => { return ( {/* when there is no field Marshmallow returns _schema */} - {error.field !== "_schema" && {error.field}: } - {error.messages.length === 1 ? ( + {error.field && error.field !== "_schema" && ( + {error.field}: + )} + {error.message ? ( + error.message + ) : error.messages && error.messages.length === 1 ? ( error.messages[0] ) : (