From 1c5503cb292f1b25ed96956fd98ad774be4d466e Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Sun, 2 Apr 2017 15:26:26 +0000 Subject: [PATCH] Custom fields: Render 'required' for tokenizer fields Summary: When building a tokenizer-based edit control for a custom field (e.g. a datasource type), preserve a field validation error whilst building edit controls. Test Plan: - Create custom datasource field, set it to required - Observe that 'Required' does not appear next to control - Apply patch - Observe 'Required' appears next to control Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: epriestley Differential Revision: https://secure.phabricator.com/D17592 --- .../standard/PhabricatorStandardCustomFieldTokenizer.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldTokenizer.php b/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldTokenizer.php index d0e4e8d6ee..d2b063ffde 100644 --- a/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldTokenizer.php +++ b/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldTokenizer.php @@ -14,6 +14,7 @@ abstract class PhabricatorStandardCustomFieldTokenizer ->setName($this->getFieldKey()) ->setDatasource($this->getDatasource()) ->setCaption($this->getCaption()) + ->setError($this->getFieldError()) ->setValue(nonempty($value, array())); $limit = $this->getFieldConfigValue('limit');