title: Using .Matches with regex for a char in fluent
body: <p>I have a class called <code>Transaction</code> which contains a property named <code>source</code></p>
  
  <p>Within the <code>Transaction</code> class I have some validation using <code>FluentValidation</code>, I am currently trying to validate the source property using <code>regex</code> however I'm having an issue</p>
  
  <pre><code>    //source isnt required but when present must be 1 character 'X' or 'Y'
      RuleFor(transaction =&gt; transacion.source)
          .Matches("^(X|Y)?$")
          .When(Transaction =&gt; transaction.source != null);
  </code></pre>
  
  <p>I am getting:</p>
  
  <blockquote>
    <p>Error 1   <code>FluentValidation.IRuleBuilderInitial&lt;MyUtility.Transaction,char?&gt;</code>
    does not contain a definition for 'Matches' and the best extension
    method overload
    <code>FluentValidation.DefaultValidatorExtensions.Matches&lt;T&gt;(FluentValidation.IRuleBuilder&lt;T,string&gt;,
    System.Text.RegularExpressions.Regex)</code> has some invalid arguments</p>
  </blockquote>
  
  <p>I have just used this exact same code for a different property with no problems, although that was a string not a char.</p>