original_string: protected function validate_use_validator( array $data, array $rules ) {
  		if ( empty( $rules ) ) {
  			return;
  		}
  
  		$validator = new Validator( $data, $rules );
  
  		$validator->labels(
  			$this->fields->pluck( 'name', 'id' )->all()
  		);
  
  		if ( $validator->fails() ) {
  			foreach ( $rules as $key => $rule ) {
  				$this->add_error( $key, $validator->errors( $key ) );
  			}
  		}
  	}
code: protected function validate_use_validator( array $data, array $rules ) {
  		if ( empty( $rules ) ) {
  			return;
  		}
  
  		$validator = new Validator( $data, $rules );
  
  		$validator->labels(
  			$this->fields->pluck( 'name', 'id' )->all()
  		);
  
  		if ( $validator->fails() ) {
  			foreach ( $rules as $key => $rule ) {
  				$this->add_error( $key, $validator->errors( $key ) );
  			}
  		}
  	}
code_tokens: protected function validate_use_validator ( array $ data , array $ rules ) { if ( empty ( $ rules ) ) { return ; } $ validator = new Validator ( $ data , $ rules ) ; $ validator -> labels ( $ this -> fields -> pluck ( 'name' , 'id' ) -> all ( ) ) ; if ( $ validator -> fails ( ) ) { foreach ( $ rules as $ key => $ rule ) { $ this -> add_error ( $ key , $ validator -> errors ( $ key ) ) ; } } }
docstring: Validate fields use "validate" parameter.
  
  @param array $data
  @param array $rules
docstring_tokens: Validate fields use validate parameter .