Fixed display errors from API in front
This commit is contained in:
@@ -159,6 +159,10 @@ export function extractFormErrorFromField(fieldName, errors) {
|
||||
if (errors === null) {
|
||||
return "";
|
||||
}
|
||||
if (errors.value == null) {
|
||||
return "";
|
||||
}
|
||||
console.log(errors.value);
|
||||
const titleErr = errors.find((e) => e["field"] === fieldName);
|
||||
if (typeof titleErr !== 'undefined') {
|
||||
return titleErr.error;
|
||||
|
||||
Reference in New Issue
Block a user