title: Alphanumeric String Validation in Angular 6
body: <p>I need to validate user input with below validations and shoulw not allow user to submit the form untill the validation error messages are cleared</p>
  
  <p>Below are the validations my code need to perform.
  1)String will be a alphanumeric.
  2)String Length should not be more than 7
  3)String should be either of theses patterns "w123456"(w followed by 6 numbers) or "df12345"(df followed by 5 numbers)</p>
  
  <p>Can someone help me how to validate this?</p>
  
  <pre><code> Contact:   &lt;textarea  required ngModel name="contacts" #contacts='ngModel' placeholder="Enter Valid contactid" ngModel name="contacts" #contacts="ngModel" rows="10" cols="15"&gt;&lt;/textarea&gt;
  </code></pre>
  
  <p>I've provide a JSFiddle link below.
  <a href="https://jsfiddle.net/sonyjammie/sx4rv8ne/4/" rel="nofollow noreferrer">https://jsfiddle.net/sonyjammie/sx4rv8ne/4/</a></p>