title: Knockout Regex validation
body: <p>I am using Knockout.validation to validate my input fields in my page. At first, everything is going well until I tried to use regex. I really don't know what it is that I'm doing wrong, hope you can help me out.</p>
  
  <p>Below is my script:</p>
  
  <pre><code>var self = this;
  self.MobileNumber = ko.observable().extend({ pattern: { params: "^(?:04\d{2}|\({1}04\d{2}\){1})\s{0,1}(\d{3}(\s{0,1})\d{3})$", message: "Invalid mobile number."} });
  </code></pre>
  
  <p>And below is my HTML page:</p>
  
  <pre><code>&lt;div&gt;
      &lt;input data-bind="value: MobileNumber, valueUpdate: 'blur'" /&gt;
  &lt;/div&gt;
  &lt;div&gt;
      &lt;p data-bind="validationMessage: MobileNumber"&gt;
      &lt;/p&gt;
  &lt;/div&gt;
  </code></pre>