src/AbstractRepository.php
public function valid($action, array $attributes)
	{
		if ($this->validator === null) {
			return true;
		}

		$result = $this->validator->valid($action, $attributes);

		if ($result === false) {
			$this->errors->merge($this->validator->getErrors());
		}

		return $result;
	}
public function valid($action, array $attributes)
	{
		if ($this->validator === null) {
			return true;
		}

		$result = $this->validator->valid($action, $attributes);

		if ($result === false) {
			$this->errors->merge($this->validator->getErrors());
		}

		return $result;
	}
Validate a set of attributes against a certain action.

@param  string $action
@param  array  $attributes

@return boolean