diff --git a/static/register.html b/static/register.html index 75e693f..00f2f65 100644 --- a/static/register.html +++ b/static/register.html @@ -9,27 +9,36 @@ + +
+

Registration

-
-
- - -
We'll never share your email with anyone else.
-
-
- - -
-
- - -
- + +
+ + +
Email must be an @my.utsa.edu email.
+
+ +
+ + +
Password must be over 8 characters.
+
+ +
+ + +
+ + Already have an account? Click here to login. - -

- - +
+

+ + +
+ diff --git a/static/register.js b/static/register.js new file mode 100644 index 0000000..fa4f5b8 --- /dev/null +++ b/static/register.js @@ -0,0 +1,33 @@ +const email = document.getElementById("email"); +const emailHelp = document.getElementById("emailHelp"); +const emailRegex = /^[^\s@]+@my\.utsa\.edu$/; +const password = document.getElementById("password"); +const passwordHelp = document.getElementById("passwordHelp"); +const passwordRegex = /^.{8,}$/; + +function showPass(){ + if(password.type === "password"){ + password.type = "text"; + } + else{ + password.type = "password"; + } +} + +function passCheck(){ + if(passwordRegex.test(password.value)){ + passwordHelp.style.color = "#66cc66"; + } + else{ + passwordHelp.style.color = "#ff6666"; + } +} + +function emailCheck(){ + if(emailRegex.test(email.value)){ + emailHelp.style.color = "#66cc66"; + } + else{ + emailHelp.style.color = "#ff6666"; + } +} \ No newline at end of file