Code
<!DOCTYPE html>
<html>
  <body>
     <p>WIKITECHY</p>
     <form  method="get">
      Enter the text:
       <input type="text" oninvalid="alert('Must fill out the form!');" required>
       <input type="submit" value="Submit">
     </form>
  </body>
</html>                                                                                                                                                                                                                                                                                                            

Result