diff options
| author | sostler <sbostler@gmail.com> | 2010-05-09 16:02:44 -0400 |
|---|---|---|
| committer | sostler <sbostler@gmail.com> | 2010-05-09 16:02:44 -0400 |
| commit | 53f35e8f30145167ac01e014c5b0d21911ff8792 (patch) | |
| tree | 327477f9a51038041688ebc8f198217a4d07cb37 | |
| parent | f5eb65fffa76ef87a6cd5fff368102e7ebd408ac (diff) | |
Reordered registration validation checks
| -rwxr-xr-x | static/js/register.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/static/js/register.js b/static/js/register.js index c351035..16cc8b0 100755 --- a/static/js/register.js +++ b/static/js/register.js @@ -16,6 +16,11 @@ function submitRegistration() { return; } + if (!validateEmail(email)) { + alert("Please enter a valid email address!"); + return; + } + if (password != password2) { alert("Passwords must match!"); return; @@ -26,11 +31,6 @@ function submitRegistration() { return; } - if (!validateEmail(email)) { - alert("Please enter a valid email address!"); - return; - } - var hash = hex_sha1(nick + '$' + password + '$dumpfm'); var onSuccess = function() { if (typeof pageTracker !== 'undefined') { |
