Page MenuHomePhabricator

Improve the error message in case of a blank space in a string
Open, Needs TriagePublic

Description

Currently, string values are not trimmed for some properties (cf T47925), and if I enter a string ending with a blank space in a text value (tested with burial plot reference (P965)), I'll get the following error:

Could not save due to an error.

Malformed input: test

Two problems here:

  • the error message doesn't give a clear indication of what is happening (a blank space at the beginning or the end of the string)
  • the blank space at the end of "test " is part of the message, but not visible because it's the very last character of the message

Which means that the user gets an error message but doesn't get a clear path to fix the input.

Suggestions: improve the description of the error message, or a minima enclose the faulty string with quotes so the blank space is more visible.