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.

Details

Related Gerrit Patches:
mediawiki/extensions/WikibaseSchema : masterInput length validation for Special:NewSchema
mediawiki/extensions/WikibaseSchema : masterLimit the input length on the Schema text edit form
mediawiki/extensions/WikibaseSchema : masterSpecial:SLDA: Add client side input length validation

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 claimed this task.Mar 21 2019, 3:17 PM
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

hoo added a comment.Mar 22 2019, 11:21 AM

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

moving back to Doing for Special:NewSchema

Addshore moved this task from incoming to in progress on the Wikidata board.Mar 25 2019, 4:02 PM

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

Lydia_Pintscher closed this task as Resolved.Apr 10 2019, 10:52 AM
Lydia_Pintscher moved this task from Verification to Done on the Shape Expressions Sprint 5 board.

\o/