setValidators() public method

Set validators
public setValidators ( array $validators = [] ) : Element
$validators array
return Element
示例#1
0
 public function testSetAndGetValidators()
 {
     $e = new Element('text', 'email');
     $e->setValidators(array(new Email()));
     $vals = $e->getValidators();
     $this->assertEquals(1, count($vals));
 }