Page MenuHomePhorge

Validate PhabricatorSearchTextField value
Closed, ResolvedPublic

Description

PhabricatorSearchTextField.php's parent class PhabricatorSearchField.php defines an (empty) protected function validateControlValue($value).
Some child classes override this function, for example PhabricatorSearchDateField.php.

The only data type to disallow for a search text field would obviously be passing an array.

This is just defensive programming, however passing an array would become in theory possible (via merging broken code in the future, not via data entered by a user) if we introduced a setDefaultValue() function in D25518.