src/Tomahawk/Validation/Validator.php
public function validate($input)
    {
        $this->messages = [];
        $this->input = $input;

        /**
         * @var ConstraintInterface $constraint
         */
        foreach ($this->constraints as $field => $constraints) {
            foreach ($constraints as $constraint) {

                // If value is empty and rule needs a value we can skip
                // checking the field
                if ($constraint->shouldSkipOnNoValue() && $this->isValueEmpty($this->getInput($field))) {
                    continue;
                }

                $constraint->validate($this, $field, $this->getInput($field));
            }

        }

        return count($this->messages) === 0;
    }
public function validate($input)
    {
        $this->messages = [];
        $this->input = $input;

        /**
         * @var ConstraintInterface $constraint
         */
        foreach ($this->constraints as $field => $constraints) {
            foreach ($constraints as $constraint) {

                // If value is empty and rule needs a value we can skip
                // checking the field
                if ($constraint->shouldSkipOnNoValue() && $this->isValueEmpty($this->getInput($field))) {
                    continue;
                }

                $constraint->validate($this, $field, $this->getInput($field));
            }

        }

        return count($this->messages) === 0;
    }
Validate given input

@param $input
@return bool