From d58c69f9499ef3db14125591bcc4660b68db62a1 Mon Sep 17 00:00:00 2001 From: svncommit <devs@roundcube.net> Date: Tue, 24 Jan 2006 20:26:00 -0500 Subject: [PATCH] Added ability to browse message list with arrow keys --- program/js/common.js | 15 ++++++++++++++- 1 files changed, 14 insertions(+), 1 deletions(-) diff --git a/program/js/common.js b/program/js/common.js index 78fecf8..02f698b 100644 --- a/program/js/common.js +++ b/program/js/common.js @@ -6,7 +6,7 @@ | Copyright (C) 2005, RoundCube Dev, - Switzerland | | Licensed under the GNU GPL | | | - | Modified:2005/10/21 (roundcube) | + | Modified:2005/11/06 (roundcube) | | | +-----------------------------------------------------------------------+ | Author: Thomas Bruederli <roundcube@gmail.com> | @@ -264,6 +264,19 @@ } +// check if input is a valid email address +function rcube_check_email(input, inline) + { + if (input && window.RegExp) + { + var reg_str = '([a-z0-9][-a-z0-9\.\+_]*)\@(([-a-z0-9][\.]?)*[a-z0-9]\.[a-z]{2,9})'; + var reg1 = inline ? new RegExp(reg_str, 'i') : new RegExp('^'+reg_str+'$', 'i'); + var reg2 = /[\._\-\@]{2}/; + return reg1.test(input) && !reg2.test(input) ? true : false; + } + return false; + } + // find a value in a specific array and returns the index function find_in_array() -- Gitblit v1.9.1