當前位置: 首頁>>代碼示例>>PHP>>正文


PHP DataValidator::validate_email方法代碼示例

本文整理匯總了PHP中DataValidator::validate_email方法的典型用法代碼示例。如果您正苦於以下問題:PHP DataValidator::validate_email方法的具體用法?PHP DataValidator::validate_email怎麽用?PHP DataValidator::validate_email使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在DataValidator的用法示例。


在下文中一共展示了DataValidator::validate_email方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1:

 if (DataValidator::validate_not_empty_string($_POST['tester_address']) === FALSE) {
     $errorsAr['tester_address'] = true;
 }
 if (DataValidator::validate_not_empty_string($_POST['tester_province']) === FALSE) {
     $errorsAr['tester_province'] = true;
 }
 if (DataValidator::validate_not_empty_string($_POST['tester_city']) === FALSE) {
     $errorsAr['tester_city'] = true;
 }
 if (DataValidator::validate_not_empty_string($_POST['tester_country']) === FALSE) {
     $errorsAr['tester_country'] = true;
 }
 if (DataValidator::validate_phone($_POST['tester_phone']) === FALSE) {
     $errorsAr['tester_phone'] = true;
 }
 if (DataValidator::validate_email($_POST['tester_email']) === FALSE) {
     $errorsAr['tester_email'] = true;
 }
 if (DataValidator::validate_string($_POST['tester_desc']) === FALSE) {
     $errorsAr['tester_desc'] = true;
 }
 if (DataValidator::validate_string($_POST['tester_resp']) === FALSE) {
     $errorsAr['tester_resp'] = true;
 }
 if (DataValidator::validate_testername($_POST['tester_pointer'], MULTIPROVIDER) === FALSE) {
     $errorsAr['tester_pointer'] = true;
 }
 if (count($errorsAr) > 0) {
     $tester_dataAr = $_POST;
     $form = AdminModuleHtmlLib::getEditTesterForm($testersAr, $tester_dataAr, $errorsAr);
 } else {
開發者ID:eguicciardi,項目名稱:ada,代碼行數:31,代碼來源:edit_tester.php

示例2: PHPMailer

 $phpmailer = new PHPMailer();
 $phpmailer->CharSet = 'UTF-8';
 $phpmailer->IsSendmail();
 $phpmailer->SetFrom(ADA_NOREPLY_MAIL_ADDRESS);
 $phpmailer->IsHTML(true);
 $phpmailer->Priority = 2;
 $phpmailer->Subject = PORTAL_NAME . ' - ' . translateFN("Aggiornamento dei contenuti del corso");
 $phpmailer->AddAddress(ADA_NOREPLY_MAIL_ADDRESS);
 foreach ($students_Ar as $destinatario) {
     /**
      * TODO: should check if $user_preferred_notification_channel
      *       for current iteration user is ADA_MSG_MAIL. As of
      *       29/apr/2014 this feature is not supported and every student
      *       shall receive the notification by email only.
      */
     if (DataValidator::validate_email($destinatario)) {
         $phpmailer->AddBCC($destinatario);
     }
 }
 $phpmailer->Body = $message_html;
 $phpmailer->AltBody = $message_text;
 if (!$phpmailer->Send()) {
     $result = new AMA_Error(AMA_ERR_SEND_MSG);
 } else {
     $result = true;
 }
 //$message_handler = MessageHandler::instance(MultiPort::getDSN($sess_selected_tester));
 //                           $message_handler = MessageHandler::instance();
 //                           $message_ha['destinatari'] =  $destinatari ;
 //                           $message_ha['data_ora']    = "now";
 //                           $message_ha['tipo']        = $user_preferred_notification_channel;
開發者ID:eguicciardi,項目名稱:ada,代碼行數:31,代碼來源:edit_node.php


注:本文中的DataValidator::validate_email方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。