Skip to content

Commit

Permalink
add password and confirm password validation
Browse files Browse the repository at this point in the history
  • Loading branch information
iPhatty committed Apr 11, 2018
1 parent b3a62e2 commit 8ef2f87
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Public/signup.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<button type="submit">Submit</button>
</form>
</section>

<script src="./signup.js"></script>

</body>

Expand Down
12 changes: 12 additions & 0 deletions Public/signup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const username = document.getElementById("username");
const password = document.getElementById("password");
const confirmPass = document.getElementById("confirm-password");

confirmPass.addEventListener('keyup',function(){
if (this.value !== password.value){
console.log("can't submit yet");
} else {
console.log("matched");
}

});

0 comments on commit 8ef2f87

Please sign in to comment.