HTMLForm: Allow returning Message objects from HTMLFormField::validate()
authorBrad Jorsch <bjorsch@wikimedia.org>
Wed, 2 Nov 2016 17:13:43 +0000 (13:13 -0400)
committerBrad Jorsch <bjorsch@wikimedia.org>
Mon, 14 Nov 2016 18:25:14 +0000 (13:25 -0500)
commit7fdbe15fb68f83b3af8baa5779123550eae19441
treefdca2f483b4872e025349dea947b0c98c2e6866e
parent79274e1f4404721a1d4236c2068310be5e378ee1
HTMLForm: Allow returning Message objects from HTMLFormField::validate()

It mostly already worked. HTMLForm::trySubmit() needed a little
adjustment to handle things properly.

Change-Id: Ibb17bb61ac0b2d41953249980bc2f23b8a3ae5b6
17 files changed:
includes/htmlform/HTMLForm.php
includes/htmlform/HTMLFormField.php
includes/htmlform/fields/HTMLAutoCompleteSelectField.php
includes/htmlform/fields/HTMLButtonField.php
includes/htmlform/fields/HTMLCheckMatrix.php
includes/htmlform/fields/HTMLDateTimeField.php
includes/htmlform/fields/HTMLFloatField.php
includes/htmlform/fields/HTMLFormFieldCloner.php
includes/htmlform/fields/HTMLIntField.php
includes/htmlform/fields/HTMLMultiSelectField.php
includes/htmlform/fields/HTMLRadioField.php
includes/htmlform/fields/HTMLRestrictionsField.php
includes/htmlform/fields/HTMLSelectAndOtherField.php
includes/htmlform/fields/HTMLSelectField.php
includes/htmlform/fields/HTMLTitleTextField.php
includes/htmlform/fields/HTMLUserTextField.php
tests/phpunit/includes/htmlform/HTMLCheckMatrixTest.php