summaryrefslogtreecommitdiff
path: root/program/include/rcube_addressbook.php
diff options
context:
space:
mode:
Diffstat (limited to 'program/include/rcube_addressbook.php')
-rw-r--r--program/include/rcube_addressbook.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/program/include/rcube_addressbook.php b/program/include/rcube_addressbook.php
index b56b58a65..ca2f1e71c 100644
--- a/program/include/rcube_addressbook.php
+++ b/program/include/rcube_addressbook.php
@@ -211,11 +211,14 @@ abstract class rcube_addressbook
*/
public function validate(&$save_data, $autofix = false)
{
+ $rcmail = rcmail::get_instance();
+
// check validity of email addresses
foreach ($this->get_col_values('email', $save_data, true) as $email) {
if (strlen($email)) {
- if (!check_email(rcube_idn_to_ascii($email))) {
- $this->set_error(self::ERROR_VALIDATE, rcube_label(array('name' => 'emailformaterror', 'vars' => array('email' => $email))));
+ if (!$rcmail->check_email(rcube_idn_to_ascii($email))) {
+ $error = $rcmail->gettext(array('name' => 'emailformaterror', 'vars' => array('email' => $email)));
+ $this->set_error(self::ERROR_VALIDATE, $error);
return false;
}
}