public function first($attribute=null) {
		if($attribute !== null)
			return $this->attribute($attribute)->first();
		else {
			if($this->rules)
				return array_values($this->rules)[0];
			elseif($this->attributes)
				return array_values($this->attributes)[0]->error();
		}
	}
public function first($attribute=null) {
		if($attribute !== null)
			return $this->attribute($attribute)->first();
		else {
			if($this->rules)
				return array_values($this->rules)[0];
			elseif($this->attributes)
				return array_values($this->attributes)[0]->error();
		}
	}
public function first ( $ attribute = null ) { if ( $ attribute !== null ) return $ this -> attribute ( $ attribute ) -> first ( ) ; else { if ( $ this -> rules ) return array_values ( $ this -> rules ) [ 0 ] ; elseif ( $ this -> attributes ) return array_values ( $ this -> attributes ) [ 0 ] -> error ( ) ; } }
Return the first error of the report or of an attribute if provided.
@param  string $attribute attribute name
@return string
Return the first error of the report or of an attribute if provided .