aboutsummaryrefslogtreecommitdiffstats
path: root/view/js/mod_zregister.js
blob: c9935e47f58e1d2d97407e0f986e7935c34cf1c2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
	$(document).ready(function() {
		$("#zregister-email").blur(function() {
			var zreg_email = $("#zregister-email").val();
			$.get("zregister/email_check.json?f=&email=" + encodeURIComponent(zreg_email),function(data) {
				$("#zregister-email-feedback").html(data.message);
				zFormError("#zregister-email-feedback",data.error);
			});
		});
		$("#zregister-password").blur(function() {
			if(($("#zregister-password").val()).length < 6 ) {
				$("#zregister-password-feedback").html(aStr['pwshort']);
				zFormError("#zregister-password-feedback",true);
			}
			else {
				$("#zregister-password-feedback").html("");
				zFormError("#zregister-password-feedback",false);
			}
		});
		$("#zregister-password2").blur(function() {
			if($("#zregister-password").val() != $("#zregister-password2").val()) {
				$("#zregister-password2-feedback").html(aStr['pwnomatch']);
				zFormError("#zregister-password2-feedback",true);
			}
			else {
				$("#zregister-password2-feedback").html("");
				zFormError("#zregister-password2-feedback",false);
			}
		});
	});

</script>