JSFiddle - React, Tailwind, and code Playground

HTML

<!DOCTYPE html>
<html>
<head>
  <title>son</title>
  <script type="text/javascript" src="javs.js"></script>    
</head>
<body>
  <form action="#" method="get">
    <input type="text" name="name" placeholder="Input your name"><br><br>
    <input type="text" name="surname" placeholder="Input your surname"><br><br>
    <input type="text" name="login" placeholder="Input your login"><br><br>
    <input type="password" name="password" placeholder="Input your password"><br><br>
    <input type="password" name="confirm" placeholder="Input your password again"><br><br>
    <input type="text" name="email" placeholder="Input your email"><br><br>
    <label for="male">Male</label>
    <input type="radio" name="radio" value = "Male" id="male">
    <label for="female">Female</label>
    <input type="radio" name="radio" value="Female" id="female">
    <input type="submit" name="submit">

  </form>


</body>
</html>

JavaScript

var f = document.forms[0];
  f.addEventListener("submit", init, false);
  function init(e){
    var isValid = true;
    if(!e) var e = window.event;
    
    e.preventDefault();
    
    for(var i = 0; i < f.elements.length; i++){
      var el = f.elements[i];
      if(el.type == "text" || el.type == "email" || el.type =="password"){
        if(el.value.length == 0)
          isValid =  false;
      }
    }
    if(isValid == false){
      alert("You didn't input all the forms")
    }
  }