. */ include_once __DIR__.'/../../core.php'; $name = filter('name'); $value = filter('value'); switch ($name) { case 'email': $check = Validate::isValidEmail($value); if (empty($check['valid-format'])) { $result = false; $errors[] = tr("L'email inserita non possiede un formato valido"); }else{ $result = true; } if (isset($check['smtp-check']) && empty($check['smtp-check'])) { $result = false; $errors[] = tr("Impossibile verificare l'origine dell'email"); } if (!empty($errors)) { $message = tr('Attenzione').':'; } $response = [ 'result' => $result, 'message' => $message, ]; break; }