title: Yii2 model rules match validation
body: <p>In model rules I have this rule:</p>
  <pre><code>[
    ['field1', 'field2,]
    'match',
    'pattern' =&gt; &quot;/^[а-яА-ЯіІїЇєЄa-zA-Z\s\`\'\-\,]*$/u&quot;,
  ]
  </code></pre>
  <p>On form submit this rule works fine. But on client side it's not working. In console I see error:</p>
  <pre><code>Uncaught SyntaxError: Invalid regular expression: /^[а-яА-ЯіІїЇєЄa-zA-Z\s\`'-,]*$/: Invalid escape
  </code></pre>
  <p>Why this rule doesn't works on client side?</p>