The panel output me this error when I tried to save an existing page: preg_match(): Unknown modifier '^'
Didn’t have that error before. I tried other pattern that may achieved what I want but still have an error (different depending on which regex I use indeed).
Here’s my field:
section_handle:
label:
en: Section ID
fr: ID de la section
type: text
width: 1/2
pattern: "/^[a-z0-9]+(?:-[a-z0-9]+)*$/"
help:
en: "Your unique section ID for identification or scrolling anchor purpose. Format : my-section-name"
fr: "L’identifiant unique de votre section à des fins d’identification ou de défilement. Format : mom-nom-de-section"
Is there any change since the latest version ? Can’t find any notice about that on the doc.
The same pattern (that did work before the update), edit with the Solution pattern still not working in a structure field.
When I click to add a new entry, I got a negative error in the panel “Cannot read property ‘length’ of null” where the handle field is supposed to be. Gif preview
Here’s my structure field:
site_colors:
label:
en: Site Colors
fr: Couleurs du site
type: structure
width: 1/2
translate: false
empty:
en: No color yet
fr: Pas encore de couleur
fields:
autoid:
type: hidden
translate: false
name:
label:
en: Name
fr: Nom
type: text
width: 1/3
handle:
label:
en: Handle
fr: Identifiant
type: text
width: 1/3
pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$"
help:
en: "Format: my-color"
fr: "Format : ma-couleur"
color:
label:
en: Color
fr: Couleur
type: color
width: 1/3
editableAlpha: false
default: "#FFFFFF"