We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 493e6f1 commit 6e2b0caCopy full SHA for 6e2b0ca
1 file changed
application/forms/FeedForm.php
@@ -52,9 +52,15 @@ protected function assemble(): void
52
$validator->addMessage($this->translate('The name must only contain alphanumeric characters'));
53
return false;
54
}
55
-
56
return true;
57
- })
+ }),
+ new CallbackValidator(function (string $value, CallbackValidator $validator) {
58
+ if ($this->storage->getFeedByName($value) !== null) {
59
+ $validator->addMessage($this->translate(sprintf("A feed with the name %s already exists", $value)));
60
+ return false;
61
+ }
62
+ return true;
63
64
],
65
]);
66
0 commit comments