From ec6b7adab6e387dfa201ef0b481a4e33b49821e4 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 20 Aug 2007 06:10:03 +0100 Subject: [PATCH] login form: validate fields --- login_form.php | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/login_form.php b/login_form.php index 9555f56f..a8f6de74 100644 --- a/login_form.php +++ b/login_form.php @@ -7,6 +7,8 @@ + + @@ -34,6 +36,26 @@ function languageChange(elem) { exception_error("languageChange", e); } } + +function validateLoginForm(f) { + try { + + if (f.login.value.length == 0) { + new Effect.Highlight(f.login); + return false; + } + + if (f.password.value.length == 0) { + new Effect.Highlight(f.password); + return false; + } + + return true; + } catch (e) { + exception_error("validateLoginForm", e); + return true; + } +} -
+ -- 2.39.5