src/Validator.php
public function addCondition($validation)
    {
        if (!$this->property) {
            throw new Exception\InvalidArgumentException(
                "Condition can be called only on properties!"
            );
        }
        $condition = new Validator\Condition(
            $this->_getValidation($validation),
            $this
        );
        $this->rules[] = $condition;
        return $condition->getValidator();
    }
public function addCondition($validation)
    {
        if (!$this->property) {
            throw new Exception\InvalidArgumentException(
                "Condition can be called only on properties!"
            );
        }
        $condition = new Validator\Condition(
            $this->_getValidation($validation),
            $this
        );
        $this->rules[] = $condition;
        return $condition->getValidator();
    }
public function addCondition ( $ validation ) { if ( ! $ this -> property ) { throw new Exception \ InvalidArgumentException ( "Condition can be called only on properties!" ) ; } $ condition = new Validator \ Condition ( $ this -> _getValidation ( $ validation ) , $ this ) ; $ this -> rules [ ] = $ condition ; return $ condition -> getValidator ( ) ; }
Add validation condition

@param mixed  $validation Callable or some default validation method name

@return \UniMapper\Validator
Add validation condition