Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Zend Form Validation:是否有与 Identical(即 notIdentical)相反的验证器?如何检查输入是否与“str”不同?
AFAIK没有像NotIdentical这样的东西。您是否以这种方式尝试过自己的验证器?:
class My_Validate_NotIdentical extends Zend_Validate_Identical { public function isValid($value) { return !parent::isValid($value); } }
它只是最简单的解决方案 - 您还应该更改验证消息等。