title: How to validate only 7 digit number?
body: <p>I'm using mvc. So I want to validate user input number is 7 digit.</p>
  
  <p>So I wrote a class.</p>
  
  <pre><code> public class StduentValidator : AbstractValidator&lt;graduandModel&gt;
      {
          public StduentValidator(ILocalizationService localizationService)
          {                          
             RuleFor(x =&gt; x.student_id).Equal(7)
                 .WithMessage(localizationService
                      .GetResource("Hire.graduand.Fields.student_id.Required"));                   
          }
  </code></pre>
  
  <p>But it is not working.
  How to validate 7 digit numbers?</p>