title: How to make Joi regex() validation fail if the string contains " " (whitespace)?
body: <p>I have the a vehicle registration number being validated by Joi in Node.js and need it to reject any string that contains whitespace (space, tab, etc.)</p>
  
  <p>I tried the following schema, but Joi does let it go through: </p>
  
  <pre><code>  const schema = { 
      regNo: Joi.string()
       .regex(/^.*\S*.*$/)
       .required()
       .trim()
      }
  </code></pre>
  
  <p>So, if I submit "JOI 777" the string is considered valid. </p>
  
  <p>What am I doing wrong? 
  Thanks in advance, </p>