Problem:
We need to set some limits for all the input fields related to Schemas.
BDD:
GIVEN a Schema page
WHEN editing it
AND trying to save a value for the label, description, alias or Schema code that is longer than the limit
THEN an error saying "The input can not be saved because it is too long. The limit is XXX" is shown
AND the edit is not saved
WHEN creating a new Schema via Special:NewSchema
AND trying to save a value for the label, description, alias or Schema code that is longer than the limit
THEN an error saying "The input can not be saved because it is too long. The limit is XXX" is shown
AND the new Schema is not saved
Acceptance criteria:
- Editors can not enter data that violates the length limits.
- This is validated in the frontend (i.e. in the input) as well
Open questions:
- What are the limits?
- Answer: For Labels/Descriptions/Aliases we go with the established limits from Items and Properties. See also T145932: [Bug] Special:NewItem does not validate maximum label length. For the Schema code it is 50 000 bytes but configurable.
Notes:
This should work on ?action=edit, the Special page for editing existing labels/descriptions/aliases as well as the Special page for creating a new Schema.