We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 57e2bfa commit 3796fbfCopy full SHA for 3796fbf
src/lib/elements/ErrorMessage.js
@@ -16,8 +16,12 @@ const FieldErrorList = ({ fieldErrors }) => {
16
return (
17
<Message.Item key={error}>
18
{/* when there is no field Marshmallow returns _schema */}
19
- {error.field !== "_schema" && <strong>{error.field}: </strong>}
20
- {error.messages.length === 1 ? (
+ {error.field && error.field !== "_schema" && (
+ <strong>{error.field}: </strong>
21
+ )}
22
+ {error.message ? (
23
+ error.message
24
+ ) : error.messages && error.messages.length === 1 ? (
25
error.messages[0]
26
) : (
27
<Message.List>
0 commit comments