code: public function sometimes($attribute, $rules = [])
      {
          $callback = function () {
              return true;
          };
          $this->validator->sometimes($attribute, $rules, $callback);
          $this->rules->addConditionalRules($attribute, (array) $rules);
      }
docs: Validate Conditional Validations using Ajax in specified fields.
  
  @param string $attribute
  @param string|array $rules
  @return void