diff --git a/src/Controller/Component/CaptchaComponent.php b/src/Controller/Component/CaptchaComponent.php index 78bafcd..ac1430a 100644 --- a/src/Controller/Component/CaptchaComponent.php +++ b/src/Controller/Component/CaptchaComponent.php @@ -80,7 +80,7 @@ public function beforeRender(EventInterface $event): void { */ public function addValidation(Validator $validator, ?string $type = null) { /** @var \Captcha\Model\Table\CaptchasTable $Captchas */ - $Captchas = TableRegistry::getTableLocator()->get('CaptchasValidator', ['class' => 'Captcha.Captchas']); + $Captchas = TableRegistry::getTableLocator()->get('Captchas', ['class' => 'Captcha.Captchas']); $Captchas->setValidator('captcha', $validator);