title: regular expression to validate MVC model property
body: <p>I need a way to validate these </p>
  
  <p>9 numeric values + V   ==> 359123404V
  or
  11 only numeric values 199245781248</p>
  
  <p>i tried below code </p>
  
  <pre><code>[Display(Name = "NIC Number")]
  [Required]
  [RegularExpression("[0-9]{11,11}\\d)|([0-9]{9,9}+v")]
  public string driverNic { get; set; }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/1GISV.png" rel="nofollow noreferrer">dose not work</a></p>
  
  <p>weirdly enough this validates only 13 numeric char input</p>