title: Using regex with Yup to validate full name with extended latin alphabet only and a minimum of 2 words
body: <p>I have a Reactjs-site where I use Formik and Yup to validate fields in the registration flow. Since I don't want to allow Japanese characters or any special characters but only the extended latin alphabet (so that users can use A-Z, a-z but also use e.g. ÅÄÖÛ).</p>
  <pre><code>.matches(
          /^([A-Za-z\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff\s]*)$/gi,
              'Name can only contain Latin letters.'
          )
  </code></pre>
  <p>This works great, but I also want the user to enter a minimum of at least 2 names. I know you can chain in Yup so i guess another .matches() with some regex in it or some other Yup rule but I can't seem to find excactly what I'm looking for...</p>
  <p>Thanks in advance! &lt;3</p>
  <h1>Update!</h1>
  <h3>This is the answer from Phan that I probably will end up using:###</h3>
  <pre><code>.matches(
      /^([A-Za-z\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff\s]*)$/gi,
          'Name can only contain Latin letters.'
      )
  .matches(/^\s*[\S]+(\s[\S]+)+\s*$/gms, 'Please enter your full name.')
  </code></pre>
  <h3>This is another solution that I found also worked for me:</h3>
  <pre><code>.matches(
      /^([A-Za-z\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff\s]*)$/g,
      'Name can only contain Latin letters.'
  )
  .matches(
      /^(?:([A-Za-z\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff\s]*)) (?:([A-Za-z\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff\s]*))$/g,
      'Please enter your full name.'
  )
  </code></pre>