verbb / formie

The most user-friendly forms plugin for Craft CMS.
Other
93 stars 68 forks source link

bug (InvalidCharacterError) on fieldError themeConfg property when multiple classes added to the class attribute #1883

Closed angelokeirsebilck closed 1 month ago

angelokeirsebilck commented 1 month ago

Describe the bug

Using the themeConfig and setting the fieldError property with multiples classes breakes the property.

  fieldError: {
                            attributes: {
                                class: 'text-error text-xs mt-1'
                            }
                        },

image

The token added to the DOMTokenlist is in the wrong format and my formie error message is printed twice. When i use only one class e.g. 'text-error' it does work.

Steps to reproduce

  1. Render form with the themeConfig
  2. use the fieldError property
  3. set the class attribute to something with two classes ( 'text-red-500 font-medium text-sm')

Form settings

Craft CMS version

5.1.2

Plugin version

dev-craft-5 as 3.0.0-beta.10

Multi-site?

No response

Additional context

No response

engram-design commented 1 month ago

Fixed for the next release. To get this early, run composer require verbb/formie:"dev-craft-5 as 3.0.0-beta.10".

engram-design commented 1 month ago

Fixed in 3.0.0-beta.11