JSFiddle - React, Tailwind, and code Playground

by Morpheus_God

HTML

<input type="text">
<input type="text">
<input type="text">

JavaScript

function isClicked(){
    var i = 0;
    var n = 0;
    var hh = document.getElementsByTagName("input");
    alert(hh);
    while (i < 15) {
      if (hh[i].getAttribute("type")=="text"){
        if (hh[i].value.length > 6){
          n = n + 1;
        }
      }
      i = i + 1;
    }
    if (n < 3)
    alert("Вам нужно заполнить минимум 6-ю символами 3 поля.");
 }
 
 isClicked();