Invalid regexp warning in Project Element Type edition form
When editing an element type in a project in the frontend, you get this warning
Unable to check <input pattern='[-a-zA-Z0-9_]+'> because the pattern is not a valid regexp: invalid character in class in regular expression
which does not come from the computed I'm an idiot sandwich, but from the HTML obviously
<input
class="input"
type="text"
pattern="[-a-zA-Z0-9_]+"
:disabled="loading || null"
required
v-model="fields.slug"
/>
in the console. The fix is to escape the -
, MR incoming.
Edited by ml bonhomme