Skip to content

Commit

Permalink
[TranslatorBundle] Added missing validation on translation file
Browse files Browse the repository at this point in the history
  • Loading branch information
krewetka committed Aug 20, 2020
1 parent 024385d commit 34d14c9
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -7,6 +7,7 @@
use Symfony\Component\Form\Extension\Core\Type\FileType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Validator\Constraints\NotBlank;

class TranslationsFileUploadType extends AbstractType
{
Expand All @@ -19,6 +20,9 @@ public function buildForm(FormBuilderInterface $builder, array $options)
$builder->add('file', FileType::class, [
'required' => true,
'label' => 'kuma_translator.form.upload_file_choose',
'constraints' => [
new NotBlank(),
],
]);
$builder->add('force', CheckboxType::class, [
'required' => false,
Expand Down

0 comments on commit 34d14c9

Please sign in to comment.