示例#1
0
文件: Form.php 项目: dev-lav/htdocs
 /**
  * Disables validation
  *
  * @return self
  */
 public function disableValidation()
 {
     foreach ($this->fields->all() as $field) {
         if ($field instanceof Field\ChoiceFormField) {
             $field->disableValidation();
         }
     }
     return $this;
 }
示例#2
0
 /**
  * Removes a field from the form.
  *
  * @param string $name The field name
  */
 public function offsetUnset($name)
 {
     $this->fields->remove($name);
 }