gpt4 book ai didi

php - ZF2 从验证器链中移除验证器

转载 作者:塔克拉玛干 更新时间:2023-11-03 05:35:47 25 4
gpt4 key购买 nike

有没有办法从输入中分离验证器?例如

$input->getValidatorChain()
->attach('email_address')
->attach('no_record_exists');

if($isExistingUser == true) {
$input->getValidatorChain()
->remove('no_record_exists');
}

最佳答案

$form->getInputFilter()->remove('no_record_exists');

Form 是一个 Zend\Form\Form 对象

关于php - ZF2 从验证器链中移除验证器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17046556/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com