1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 16:56:44 +02:00

[ticket/10896] Adds email validation to email settings in ACP

Adds a new validation type to the ACP validate_config_vars function
and implements it on the board_contact and board_email settings.

PHPBB3-10896
This commit is contained in:
David Tobin
2012-07-05 02:47:49 +01:00
committed by Nathan Guse
parent 996f1abee3
commit 293b65e3ef
3 changed files with 10 additions and 2 deletions

View File

@@ -449,6 +449,13 @@ function validate_config_vars($config_vars, &$cfg_array, &$error)
}
break;
case 'email':
if (!preg_match('/^' . get_preg_expression('email') . '$/i', $cfg_array[$config_name]))
{
$error[] = $user->lang['EMAIL_INVALID'];
}
break;
// Absolute path
case 'script_path':
if (!$cfg_array[$config_name])