code: public function rules(Array $rules)
      {
          foreach ($rules as $key => $value) {
              $this->rule(
                  $key, $value['label'],
                  $value['rules'],
                  isset($value['text']) && ! empty($value['text']) ? $value['text'] : []
              );
          }
      }
docs: Define Validation Rules
  
  @param array $rules
  
  @return void