Skip to content
Permalink
Browse files Browse the repository at this point in the history
Merge pull request from GHSA-cx2r-mf6x-55rx
The custom url field must be a valid url
  • Loading branch information
PierreRambaud committed Apr 15, 2020
2 parents b90005c + 632e619 commit 83e6e0b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Form/Type/CustomUrlType.php
Expand Up @@ -29,6 +29,7 @@
use PrestaShopBundle\Form\Admin\Type\TranslatorAwareType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Validator\Constraints as Assert;

class CustomUrlType extends TranslatorAwareType
{
Expand All @@ -45,6 +46,7 @@ public function buildForm(FormBuilderInterface $builder, array $options)
->add('url', TextType::class, [
'label' => $this->trans('URL', 'Modules.Linklist.Admin'),
'required' => true,
'constraints' => [new Assert\Url()],
])
;
}
Expand Down

0 comments on commit 83e6e0b

Please sign in to comment.