title: How to set a custom error message to a form in angular
body: <p>I have the below code in my component:</p>
  
  <pre><code> if (form.controls['minRange'].hasError('min')) {
          form.controls['minRange'].setErrors({ min: true });
   }
  </code></pre>
  
  <p>I am getting the message in input as 'minRange is invalid'.But I want to display the error message as 'P</p>
  
  <pre><code>'Please enter a 5 digit value'
  </code></pre>
  
  <p>Like .setErrors how can I set errormessage in formcontrol.Can any one please help me.Thanks.</p>