<form action="">
    <input minlength="4">
    <button type="submit">submit</button>
</form>