title: angularjs single input filed for both email and mobile number
body: <p>In the registration form i have single field for both email and mobile number but it doesn't working properly.</p>
  <pre><code>&lt;form name=&quot;regForm&quot; &gt;
  &lt;md-input-container flex md-no-float&gt;
     &lt;input ng-model=&quot;vm.form.email&quot; type=&quot;text&quot; placeholder=&quot;Email or Phone&quot; translate translate-attr-placeholder=&quot;REGISTER.EMAIL&quot; name=&quot;email or phone&quot; ng-pattern=&quot;/^([_a-z0-9]+(\.[_a-z0-9]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,5}))|\d+$/&quot;  required=&quot;true&quot;&gt;
     &lt;div ng-messages=&quot;regForm.email.$error&quot; ng-show=&quot;regForm.email.$touched&quot;&gt;
       &lt;div ng-message=&quot;required&quot;&gt;This field is required&lt;/div&gt;
       &lt;div ng-message=&quot;email&quot;&gt;Your email address is invalid&lt;/div&gt;
     &lt;/div&gt;
  &lt;/md-input-container&gt;
  &lt;/form&gt;
  </code></pre>
  <p>Below code showing schema in model file</p>
  <h2>userModel.js</h2>
  <pre><code>var UserSchema = new Schema({
     name: String,
     email: {type: String, required: true, select: true},
     password: {type: String, required: true, select: true},
  });
  </code></pre>