JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<input type="text" id="password" />
<input type="button" class="btnSubmit" value="Submit" />
<p class="error"></p>

JavaScript

$('.btnSubmit').click(function(){
  if($("#password").val().length < 6){
    $('.error').html('Must have a min of 6 chars');
  }else{
    $('.error').html('Good to go.');
  }
});