added regex for country names

This commit is contained in:
Roland Gruber 2005-04-07 13:10:15 +00:00
parent ad68908657
commit 52fd5c9ccd
1 changed files with 3 additions and 0 deletions

View File

@ -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)) {