JSFiddle - React, Tailwind, and code Playground
HTML
<form method="post" action="/" id="form">
<input type="text" name="mail" placeholder="Email" autocomplete="off" required />
<input type="text" name="pass" placeholder="Password" autocomplete="off" required />
<button disabled>Регистрация</button>
</form>
JavaScript
$(document).ready(function(){
$(':input').keyup(function(){
if ($('[name=mail]').val().length > 2 && $('[name=pass]').val().length > 4) $('button').removeAttr('disabled');
else $('button').attr('disabled',true);
});
});