From 52fd5c9ccd66a1b326eff70da1ecbfba267a6f5f Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Thu, 7 Apr 2005 13:10:15 +0000 Subject: [PATCH] added regex for country names --- lam/lib/account.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lam/lib/account.inc b/lam/lib/account.inc index 69dbbbc1..181218bb 100644 --- a/lam/lib/account.inc +++ b/lam/lib/account.inc @@ -508,6 +508,9 @@ function get_preg($argument, $regexp) { case 'nis_recipient': $pregexpr = '/^([[:alnum:]@\\.\\ \\_-])+$/u'; break; + case 'country': // Allow all letters and space + $pregexpr = '/^[[:alpha:]]([[:alpha:] ])+$/u'; + break; } if ($pregexpr!='') if (preg_match($pregexpr, $argument)) {