Field validation for all fields in paragraph can be bypassed

Created on 20 March 2019, over 5 years ago
Updated 14 November 2023, about 1 year ago

I have found a use case where it is possible to bypass any validation on any field within a paragraph. This basically allows to store values in the database that are not allowed by field settings.

Steps to reproduce:
1/ Create a paragraph with a numeric field and set the constraints to minimum 0, maximum 10.
2/ Create a content type and a paragraphs field with the classic widget on that content type that allows the paragraph from 1/
3/ Set the classic widget "Edit mode" to "preview". (this is the crucial bit, other modes work correctly)
4/ Create a node from the content type from 2/ and add a valid paragraph to it. Save the node.
5/ Edit the node, enter an invalid number in the numeric field in the paragraph (20 for example), collapse the paragraph and save the node.

After 5/ I would expect a validation error, but the node saves and the value "20" is stored to database.

If you set the "Edit mode" to something else then "preview" the paragraph can not be collapsed until the fields validate.

๐Ÿ› Bug report
Status

Needs work

Version

1.0

Component

Code

Created by

๐Ÿ‡ง๐Ÿ‡ชBelgium weseze

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