How to set validation error for specific subfield of the paragraph type?
In the docs page for setErrorByName() we can read:


  string $name: The name of the form element. If the #parents property of your form element is array('foo', 'bar', 'baz') then you may set an error on foo or foo][bar][baz. Setting an error on 'foo' sets an error for every element where the #parents array starts with 'foo'.


We should also note the following code how it's parsed:

public function setErrorByName($name, $message = '') {
  // ...
      foreach ($limit_validation_errors as $section) {
        // Exploding by '][' reconstructs the element's #parents. If the
        // reconstructed #parents begin with the same keys as the specified
        // section, then the element's values are within the part of
        // $form_state-&gt;getValues() that the clicked button requires to be
        // valid, so errors for this element must be recorded. As the exploded
        // array will all be strings, we need to cast every value of the
        // section array to string.
        if (array_slice(explode('][', $name), 0, count($section)) === array_map('strval', $section)) {


So the mentioned element should have the following syntax:

$form_state-&gt;setErrorByName("field_sor_rule][0][subform][field_sor_rule][0",
  t('Please enter a valid value!'));