document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. function registration(){
  2.  
  3.     var studentName = document.getElementById("name").value;
  4.     var studentNRP = document.getElementById("NRP").value;
  5.     var studentPass = document.getElementById("pass").value;
  6.     var studentConfPass = document.getElementById("confPass").value;
  7.  
  8.     var letters = /^[A-Za-z]+$/;
  9.  
  10.     if (studentName == "" || studentNRP == "" || studentPass == "" || studentConfPass == "") {
  11.         alert("Enter each details correctly");
  12.     } else if (!letters.test(studentName)) {
  13.     alert("only can use alphabet in this column");
  14.     } // else if (pass != confPass) {
  15.     // alert("Passwords not matching");
  16.     // }
  17.      else if (document.getElementById("pass").value.length <= 8) {
  18.     alert("Password minimum length is 8");
  19.     }else {
  20.     alert(
  21.         "Your account has been created succesfully"
  22.     );
  23.     }
  24.    
  25. }
');