disableValidation() 공개 메소드

Disables the internal validation of the field.
public disableValidation ( ) : self
리턴 self
 public function testDisableValidation()
 {
     $node = $this->createSelectNode(array('foo' => false, 'bar' => false));
     $field = new ChoiceFormField($node);
     $field->disableValidation();
     $field->setValue('foobar');
     $this->assertEquals('foobar', $field->getValue(), '->disableValidation() allows to set a value which is not in the selected options.');
     $node = $this->createSelectNode(array('foo' => false, 'bar' => false), array('multiple' => 'multiple'));
     $field = new ChoiceFormField($node);
     $field->disableValidation();
     $field->setValue(array('foobar'));
     $this->assertEquals(array('foobar'), $field->getValue(), '->disableValidation() allows to set a value which is not in the selected options.');
 }