setErrorDisplay() public method

Set error pre-display globally across all form element objects
public setErrorDisplay ( string $container, array $attribs, boolean $pre = false ) : Form
$container string
$attribs array
$pre boolean
return Form
Ejemplo n.º 1
0
 public function testConstructorSetFields()
 {
     $fields = array('username' => array('type' => 'text', 'value' => 'Username here...', 'label' => 'Username:'******'required' => true, 'attributes' => array('size' => 40)));
     $f = new Form('/submit', 'post', $fields);
     $f->setErrorDisplay('h3', array('class' => 'error-class'), true);
     $this->assertEquals(1, count($f->getFields()));
 }