addCondition() public method

Adds a validation condition and returns new branch.
public addCondition ( $validator, $arg = NULL ) : self
return self new branch
Esempio n. 1
0
	/**
	 * Adds a validation condition a returns new branch.
	 * @param  mixed     condition type
	 * @param  mixed      optional condition arguments
	 * @return Rules      new branch
	 */
	public function addCondition($operation, $value = NULL)
	{
		return $this->rules->addCondition($operation, $value);
	}
Esempio n. 2
0
 /**
  * Adds a validation condition a returns new branch.
  * @param  mixed     condition type
  * @param  mixed     optional condition arguments
  * @return Rules      new branch
  */
 public function addCondition($validator, $value = NULL)
 {
     return $this->rules->addCondition($validator, $value);
 }