Skip to content

display field form errors in ObjectBrowserWidget. #6787

Open
@alexandreIFB

Description

@alexandreIFB

Describe the bug
When using the ObjectBrowserWidget, external errors (e.g. required field) do not display visual alerts in the form field. This prevents the manager from clearly identifying the issues.

Example in Teaser:
Current behavior:
Image

Expected behavior:
Image

Simulate

To simulate the issue and verify the fix:

Save Teaser without providing Target ( href).

Additional context
The problem is related to the validateManualLink and onSubmitManualLink methods, where internal errors are not being merged with external errors.

if (error && url !== '') {
this.setState({ errors: [error] });
} else {
this.setState({ errors: [] });
}

A possible solution is to combine this.state.errors with this.props.error in the render method before passing them to the FormFieldWrapper.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions