更新 'src/Listener/ValidatorFactoryResolvedListener.php'
This commit is contained in:
parent
131f747f71
commit
0bcd8b73ab
|
@ -1,13 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
/**
|
|
||||||
* This file is part of hyperf-ext/captcha.
|
|
||||||
*
|
|
||||||
* @link https://github.com/hyperf-ext/captcha
|
|
||||||
* @contact eric@zhu.email
|
|
||||||
* @license https://github.com/hyperf-ext/captcha/blob/master/LICENSE
|
|
||||||
*/
|
|
||||||
namespace Zyimm\Captcha\Listener;
|
namespace Zyimm\Captcha\Listener;
|
||||||
|
|
||||||
use Hyperf\Event\Contract\ListenerInterface;
|
use Hyperf\Event\Contract\ListenerInterface;
|
||||||
|
@ -26,7 +20,7 @@ class ValidatorFactoryResolvedListener implements ListenerInterface
|
||||||
|
|
||||||
public function process(object $event)
|
public function process(object $event)
|
||||||
{
|
{
|
||||||
/** @var \Hyperf\Validation\Contract\ValidatorFactoryInterface $validatorFactory */
|
|
||||||
$validatorFactory = $event->validatorFactory;
|
$validatorFactory = $event->validatorFactory;
|
||||||
|
|
||||||
$validatorFactory->extend('captcha', function ($attribute, $value, $parameters, $validator) {
|
$validatorFactory->extend('captcha', function ($attribute, $value, $parameters, $validator) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user