diff --git a/src/Form/Type/Api/EditPackageType.php b/src/Form/Type/Api/EditPackageType.php index 24e8f996..9cb29446 100644 --- a/src/Form/Type/Api/EditPackageType.php +++ b/src/Form/Type/Api/EditPackageType.php @@ -36,6 +36,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void 'label' => 'Keep last releases', 'help' => 'Number of last releases that will be downloaded. Put "0" to download all.', 'constraints' => [ + new NotBlank(), new PositiveOrZero(), ], ]); diff --git a/src/Form/Type/Organization/EditPackageType.php b/src/Form/Type/Organization/EditPackageType.php index dfcfe170..c917fc5e 100644 --- a/src/Form/Type/Organization/EditPackageType.php +++ b/src/Form/Type/Organization/EditPackageType.php @@ -35,6 +35,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void 'label' => 'Keep last releases', 'help' => 'Number of last releases that will be downloaded. Put "0" to download all.', 'constraints' => [ + new NotBlank(), new PositiveOrZero(), ], ])