Ensured only empty strings are checked while verifying empty value on custom slug

This commit is contained in:
Alejandro Celaya 2020-03-06 19:25:05 +01:00
parent 67e93a6874
commit 18ceafeb60

View File

@ -44,7 +44,7 @@ class ShortUrlMetaInputFilter extends InputFilter
// empty, is by using the deprecated setContinueIfEmpty
$customSlug = $this->createInput(self::CUSTOM_SLUG, false)->setContinueIfEmpty(true);
$customSlug->getFilterChain()->attach(new Validation\SluggerFilter());
$customSlug->getValidatorChain()->attach(new Validator\NotEmpty());
$customSlug->getValidatorChain()->attach(new Validator\NotEmpty(Validator\NotEmpty::STRING));
$this->add($customSlug);
$this->add($this->createPositiveNumberInput(self::MAX_VISITS));