title: Cannot mix different versions of joi schemas error when using joi-password-complexity
body: <p>I am having some trouble integrating <a href="https://github.com/kamronbatman/joi-password-complexity" rel="nofollow noreferrer">joi-password-complexity</a> into my Joi validation logic. The error I get is <code>Cannot mix different versions of joi schemas</code>. What do I need to change?</p>
  
  <p>schemasShared.js</p>
  
  <pre class="lang-js prettyprint-override"><code>const Joi = require('@hapi/joi');
  const JoiPasswordComplexity = require('joi-password-complexity');
  
  const joiPasswordComplexityOptions = {
      min: 10,
      max: 50,
      lowerCase: 1,
      upperCase: 1,
      numeric: 1,
      symbol: 1,
      requirementCount: 4,
  };
  
  const passwordLogin = new JoiPasswordComplexity(
      joiPasswordComplexityOptions
  );
  
  
  module.exports = {
      passwordLogin
  };
  </code></pre>
  
  <p>auth.schemas.js</p>
  
  <pre class="lang-js prettyprint-override"><code>const Joi = require('@hapi/joi');
  const schemasShared = require('../../utils/schemasShared');
  
  const authRequirements = {
      password: schemasShared.passwordLogin,
  }
  
  const authSchemas = {
      loginBody: Joi.object({ // The error points to this line, specifically to .object
          password: authRequirements
              .password
              .required(),
      }),
  }
  </code></pre>
  
  <p>My versions:</p>
  
  <ul>
  <li>"@hapi/joi": "^16.1.7"</li>
  <li>"joi-password-complexity": "^3.1.0",</li>
  </ul>