original_string: public function validate($addable)
  	{
  		foreach ($addable->elements as $element) {
  
  			$classes = class_parents($element);
  
  			// no validation needed
  			if (in_array("HtmlForm\Elements\Parents\Html", $classes)) {
  				continue;
  			}
  
  			if (in_array("HtmlForm\Abstracts\Addable", $classes)) {
  
  				// validate this addable (fieldset)
  				$moreErrors = $this->validate($element);
  
  			} else {
  
  				$class = $this->findclass($element);
  
  				if ($class == "honeypot") {
  					$value = $element->getRawValue();
  					$this->honeypot($value);
  					continue;
  				}
  
  				// validate this element
  				$elementErrors = $element->validate();
  
  				// add new errors to the list
  				$this->errors = array_merge($this->errors, $elementErrors);
  
  			}
  
  		}
  
  		return empty($this->errors);
  	}
code: public function validate($addable)
  	{
  		foreach ($addable->elements as $element) {
  
  			$classes = class_parents($element);
  
  			// no validation needed
  			if (in_array("HtmlForm\Elements\Parents\Html", $classes)) {
  				continue;
  			}
  
  			if (in_array("HtmlForm\Abstracts\Addable", $classes)) {
  
  				// validate this addable (fieldset)
  				$moreErrors = $this->validate($element);
  
  			} else {
  
  				$class = $this->findclass($element);
  
  				if ($class == "honeypot") {
  					$value = $element->getRawValue();
  					$this->honeypot($value);
  					continue;
  				}
  
  				// validate this element
  				$elementErrors = $element->validate();
  
  				// add new errors to the list
  				$this->errors = array_merge($this->errors, $elementErrors);
  
  			}
  
  		}
  
  		return empty($this->errors);
  	}
code_tokens: public function validate ( $ addable ) { foreach ( $ addable -> elements as $ element ) { $ classes = class_parents ( $ element ) ; // no validation needed if ( in_array ( "HtmlForm\Elements\Parents\Html" , $ classes ) ) { continue ; } if ( in_array ( "HtmlForm\Abstracts\Addable" , $ classes ) ) { // validate this addable (fieldset) $ moreErrors = $ this -> validate ( $ element ) ; } else { $ class = $ this -> findclass ( $ element ) ; if ( $ class == "honeypot" ) { $ value = $ element -> getRawValue ( ) ; $ this -> honeypot ( $ value ) ; continue ; } // validate this element $ elementErrors = $ element -> validate ( ) ; // add new errors to the list $ this -> errors = array_merge ( $ this -> errors , $ elementErrors ) ; } } return empty ( $ this -> errors ) ; }
docstring: Runs through the validation required by
  each form element.
  @param  object $addable Object that extends from \HtmlForm\Abstracts\Addable
  @return array Found errors
docstring_tokens: Runs through the validation required by each form element .