Should not trigger form validation on ajax call

Created on 17 September 2020, over 4 years ago
Updated 14 May 2024, 7 months ago

Problem/Motivation

We use paragraphs on a contenttype. Usually, the paragraph subform will be added to the node add/edit by ajax trigger (>Add paragraph< button), as it is similar for multi-value fields (>Add another item< button).
Having unique_field validation configured for this content type, the paragraph-subform does not appear after ajax trigger.

Steps to reproduce

1. Add a paragraph or other multi-value field to an content type.
2. Add a validation rule to other field on same content type.
2. Add new value to the first field (expand the form). The form will not expand.

Proposed resolution

Do not validate the form if it was submitted by ajax.

Remaining tasks

I added a patch. Please test and improve. Not sure if the validation will be necessary in other cases even if form is submitted by ajax.

User interface changes

None.

API changes

None.

Data model changes

None.

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany e5sego

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024