title: How to validate regex using express-validator?
body: <p>I'm trying to validate a mobile number regex using <a href="https://express-validator.github.io/docs/" rel="nofollow noreferrer">express-validator</a>.</p>
  <p>I have browsed through the docs api but couldn't find the validator function that checks a regex. Will using <code>regex.test()</code> like the following work?</p>
  <pre><code>
  body('mobile', 'Invalid mobile number.')
             .escape()
             .exists({checkFalsy: true})
             .isLength({min: 11, max:11})
             .regex.test(/^(\+123)\d{11}$/)
  </code></pre>