← All tests

Allow % in attribute & category names (prod)

SHIPPED 2026-06-11 · nix-cafe 735145d · no migration · Gate 2 7/7 · regression 51/51

Reported via screenshot on get-coffee: adding sugar-level attribute values like 50% / 100% on the Attributes & Modifiers page raised “Value contains invalid characters”. The server-side name allowlist now accepts % + * # ! $ = ° for attribute names, values, and categories. Bonus fix found while testing: the old regex also rejected Khmer combining marks (coeng/vowel signs are \p{M}, not letters), so real Khmer names like ផ្អែម were being blocked too — now allowed.

1 — Create attribute with value “50%”

The create-attribute modal on lumiere with a 50% value — previously rejected, now submits cleanly (DB-verified persisted).

Create attribute modal with 50% value
Create modal — value “50%” accepted

2 — Edit modal: add “100%” (the reported path)

The exact flow from the bug screenshot — the edit-attribute modal’s “Add value” row with 100%. No alert fires (the test listens for browser dialogs and fails if one appears).

Edit modal with 100% value added
Edit modal — “100%” added to the values list

3 — Khmer value with combining marks

Latent bug fixed alongside: ផ្អែម 25% (“sweet 25%”) contains Khmer coeng + vowel signs that the old regex classified as invalid. Now accepted and rendered in the values list.

Edit modal with Khmer value added
Edit modal — Khmer value accepted

4 — Categories page gets the same fix

The Categories page shares the same validation pattern — a ZZ50% Off category creates cleanly (test row, cleaned up after).

Categories page with % category
Categories — “ZZ50% Off” accepted