Skip to main content
Version: Current (v7.0.0-beta.3)

A row for a forbidden extra key shows an error from the first render

Detect​

  • Your schema forbids some extra keys through additionalProperties, unevaluatedProperties or patternProperties on an object that takes others, such as one matching none of the patternProperties beside additionalProperties: false, and your data can hold such a key.
  • Snapshots or tests of such a row.
  • A translateString that maps every TranslatableString key.

Change​

Such a row used to render with no input for its value and no word of why, until a submit reported must NOT have additional properties on the object (#4630). It now says The key "%1" is not allowed here from the first render on and right after a rename, without waiting for validation, so a snapshot of such a row gains the error. The key input of a forbidden key is now aria-invalid and described by the row's errors. A key that only propertyNames forbids gets no such message.

Update snapshots. The message is the new TranslatableString.AdditionalPropertyKeyNotAllowed; a translateString that maps every key needs it, along with the other new keys listed in A translateString that maps every key needs the new TranslatableString keys.

Verify​

  • A forbidden key's row shows the message and its key input is aria-invalid.
  • Your translateString returns a translation for AdditionalPropertyKeyNotAllowed.

Also read: