public function validateAsArray($bool = null) {

		if(false === is_bool($bool) && null !== $bool) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type boolean, "%s" given', __METHOD__, gettype($bool)), E_USER_ERROR);
		}

		if(null === $bool) {
			$bool = true;
		}

		foreach($this -> getFieldnames() as $field) {
			$this -> validateAsArray[$field] = $bool;
		}

		return $this;
	}
public function validateAsArray($bool = null) {

		if(false === is_bool($bool) && null !== $bool) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type boolean, "%s" given', __METHOD__, gettype($bool)), E_USER_ERROR);
		}

		if(null === $bool) {
			$bool = true;
		}

		foreach($this -> getFieldnames() as $field) {
			$this -> validateAsArray[$field] = $bool;
		}

		return $this;
	}
public function validateAsArray ( $ bool = null ) { if ( false === is_bool ( $ bool ) && null !== $ bool ) { return trigger_error ( sprintf ( 'Argument 1 passed to %s() must be of the type boolean, "%s" given' , __METHOD__ , gettype ( $ bool ) ) , E_USER_ERROR ) ; } if ( null === $ bool ) { $ bool = true ; } foreach ( $ this -> getFieldnames ( ) as $ field ) { $ this -> validateAsArray [ $ field ] = $ bool ; } return $ this ; }
Set a rule that a field value must be an array and all array items will be validated individual
@param boolean|null $bool
@return sFire\Validator
Set a rule that a field value must be an array and all array items will be validated individual