src/components/Handler.php
public function with_validation( $validations = array() ) {

		foreach ( (array) $validations as $condition => $value ) {
			$this->validator->add_validation( $condition, $value );
		}

		return $this;
	}
public function with_validation( $validations = array() ) {

		foreach ( (array) $validations as $condition => $value ) {
			$this->validator->add_validation( $condition, $value );
		}

		return $this;
	}
Registers the validation settings.

@param array $validations The validation settings.

@return Handler