HomePhabricator

HTMLTitleTextField: Allow this field to not be required

Authored by matmarex on May 7 2018, 6:57 PM.

Description

HTMLTitleTextField: Allow this field to not be required

Previously we would always run the validation, and it would fail when
the field was empty, since empty string is not a valid title.

Respect the 'required' option (defined by HTMLFormField) and make it
default to true for compatibility with existing forms that might rely
on this.

Also add a TODO comment about a confusing special case in validation
code. I don't want to dig into that.

Change-Id: I93ad51ffe7bee597d2d127f4c5d6b2929ffc8f7e