Skip to content

Commit

Permalink
FIX Insert file link text is required
Browse files Browse the repository at this point in the history
  • Loading branch information
Sabina Talipova committed Sep 25, 2023
1 parent 03973f9 commit e1cba92
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions code/Forms/AssetFormFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

/**
Expand Down

0 comments on commit e1cba92

Please sign in to comment.