original_string: public function remove($field, $rule = null)
      {
          if ($rule === null) {
              unset($this->_fields[$field]);
          } else {
              $this->field($field)->remove($rule);
          }
  
          return $this;
      }
code: public function remove($field, $rule = null)
      {
          if ($rule === null) {
              unset($this->_fields[$field]);
          } else {
              $this->field($field)->remove($rule);
          }
  
          return $this;
      }
code_tokens: public function remove ( $ field , $ rule = null ) { if ( $ rule === null ) { unset ( $ this -> _fields [ $ field ] ) ; } else { $ this -> field ( $ field ) -> remove ( $ rule ) ; } return $ this ; }
docstring: Removes a rule from the set by its name
  
  ### Example:
  
  ```
  $validator
  ->remove('title', 'required')
  ->remove('user_id')
  ```
  
  @param string $field The name of the field from which the rule will be removed
  @param string|null $rule the name of the rule to be removed
  @return $this
docstring_tokens: Removes a rule from the set by its name