code: public function rule($field, $label, $rules, array $text = [])
      {
          $this->labels[$field] = $label;
          $this->rules[$field] = $rules;
          $this->texts[$field] = (! empty($text) ? $text : null);
      }
docs: Define One Validation Rule
  
  @param string $field
  @param string $label
  @param string $rules
  @param array  $text
  
  @return void