Page MenuHomePhabricator

Validate length limits for Schema inputs in the front-end
Closed, ResolvedPublic

Description

T214904: [Story] length limits for Schema inputs requires that the length limits are “validated in the frontend (i.e. in the input) as well”, but that doesn’t seem to be done – right now you’ll only see an error after submitting the overlong data.

Event Timeline

To be honest, I’m not sure what exactly this implies. If we set a maxlength, the browser will discard the extra characters, and if the user doesn’t notice that some of their input is missing, the submit will go through and save incomplete data. Do we want that?

(I think we discussed this in some meeting too, but unfortunately I can’t remember the outcome.)

hoo moved this task from Backlog to Doing on the Shape Expressions Sprint 4 board.
hoo added a subscriber: hoo.

I think there's a mw lib for this, will investigate.

Change 498281 had a related patch set uploaded (by Hoo man; owner: Hoo man):
[mediawiki/extensions/WikibaseSchema@master] Special:SLDA: Add client side input length validation

https://gerrit.wikimedia.org/r/498281

Patch is up for Special:SetSchemaLabelDescriptionAliases, but editing schema text (action=edit) still missing.

Change 498344 had a related patch set uploaded (by Hoo man; owner: Hoo man):
[mediawiki/extensions/WikibaseSchema@master] Limit the input length on the Schema text edit form

https://gerrit.wikimedia.org/r/498344

Turns out I forgot Special:NewSchema… will do next.

Change 498281 merged by jenkins-bot:
[mediawiki/extensions/WikibaseSchema@master] Special:SLDA: Add client side input length validation

https://gerrit.wikimedia.org/r/498281

Change 498344 merged by jenkins-bot:
[mediawiki/extensions/WikibaseSchema@master] Limit the input length on the Schema text edit form

https://gerrit.wikimedia.org/r/498344

Change 498962 had a related patch set uploaded (by Hoo man; owner: Hoo man):
[mediawiki/extensions/WikibaseSchema@master] Input length validation for Special:NewSchema

https://gerrit.wikimedia.org/r/498962

Change 498962 merged by jenkins-bot:
[mediawiki/extensions/WikibaseSchema@master] Input length validation for Special:NewSchema

https://gerrit.wikimedia.org/r/498962