Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
1.3 kB
2
Indexable
Never
<html>
    <head>
    <title>pasw val 2</title>
    </head>
    <body>
        <script>
           function u() {
               var pw = document.getElementById("psw").value;
               if(pw.search(/[A-Z]/) < 0)
               {
                   alert("MINIMUM ONE UPPERCASE");
                   return false;
               }
               else if(pw.search(/[0-9]/) < 0)
               {
                    alert("MINIMUM ONE number");
                   return false;
               }
               else if(pw.search(/[# *]/) < 0)
               {
                    alert("MINIMUM ONE SYMBOL");
                   return false;
               }
                else if(pw.length < 8)
               {
                    alert("MINIMUM 8 CHARACTER");
                   return false;
               }
               else
               {
                   alert("succesfull");
               }
               
           }
        </script>
        <center>
            <h1>ENTER YOUR PASSWORD</h1>
            <form onsubmit ="return u()">
                enter your password:<input type="password" id="psw">
                <span id="msg"></span>
                <input type="submit" value="submit">
                
            </form>
        </center>
        
    </body>
</html>