diff --git a/code/Forms/AssetFormFactory.php b/code/Forms/AssetFormFactory.php index 80eeebae7..f2944a397 100644 --- a/code/Forms/AssetFormFactory.php +++ b/code/Forms/AssetFormFactory.php @@ -110,9 +110,9 @@ public function getForm(RequestHandler $controller = null, $name = FormFactory:: */ protected function getValidator(RequestHandler $controller = null, $formName, $context = []) { - $validator = new RequiredFields('Name'); - - return $validator; + return $context['RequireLinkText'] + ? RequiredFields::create('Name', 'Text') + : RequiredFields::create('Name'); } /**