src/Services/Validator.php
public function validate( $data, array $rules = [] )
	{
		$this->normalizeData( $data );
		$this->setRules( $rules );

		foreach( $this->rules as $attribute => $rules ) {
			foreach( $rules as $rule ) {
				$this->validateAttribute( $rule, $attribute );

				if( $this->shouldStopValidating( $attribute ))break;
			}
		}

		return $this->errors;
	}
public function validate( $data, array $rules = [] )
	{
		$this->normalizeData( $data );
		$this->setRules( $rules );

		foreach( $this->rules as $attribute => $rules ) {
			foreach( $rules as $rule ) {
				$this->validateAttribute( $rule, $attribute );

				if( $this->shouldStopValidating( $attribute ))break;
			}
		}

		return $this->errors;
	}
public function validate ( $ data , array $ rules = [ ] ) { $ this -> normalizeData ( $ data ) ; $ this -> setRules ( $ rules ) ; foreach ( $ this -> rules as $ attribute => $ rules ) { foreach ( $ rules as $ rule ) { $ this -> validateAttribute ( $ rule , $ attribute ) ; if ( $ this -> shouldStopValidating ( $ attribute ) ) break ; } } return $ this -> errors ; }
Run the validator's rules against its data.

@param mixed $data

@return array
Run the validator s rules against its data .