当前位置: 首页>>代码示例>>PHP>>正文


PHP DataValidator::validate_string方法代码示例

本文整理汇总了PHP中DataValidator::validate_string方法的典型用法代码示例。如果您正苦于以下问题:PHP DataValidator::validate_string方法的具体用法?PHP DataValidator::validate_string怎么用?PHP DataValidator::validate_string使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DataValidator的用法示例。


在下文中一共展示了DataValidator::validate_string方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: unset

 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 {
     unset($_POST['submit']);
     $tester_dataAr = $_POST;
     $result = $common_dh->set_tester($tester_dataAr['tester_id'], $tester_dataAr);
     if (AMA_Common_DataHandler::isError($result)) {
         $errObj = new ADA_Error($result);
         $form = new CText('');
开发者ID:eguicciardi,项目名称:ada,代码行数:31,代码来源:edit_tester.php

示例2: array

 */
$variableToClearAR = array('node', 'layout', 'course', 'course_instance');
/**
 * Performs basic controls before entering this module
 */
/**
 * Users (types) allowed to access this module.
 */
$allowedUsersAr = array(AMA_TYPE_VISITOR, AMA_TYPE_STUDENT, AMA_TYPE_TUTOR, AMA_TYPE_AUTHOR, AMA_TYPE_SWITCHER);
/**
 * Get needed objects
 */
$neededObjAr = array(AMA_TYPE_VISITOR => array('layout'), AMA_TYPE_STUDENT => array('layout'), AMA_TYPE_TUTOR => array('layout'), AMA_TYPE_AUTHOR => array('layout'), AMA_TYPE_SWITCHER => array('layout'), AMA_TYPE_ADMIN => array('layout'));
require_once ROOT_DIR . '/include/module_init.inc.php';
require_once ROOT_DIR . '/browsing/include/browsing_functions.inc.php';
$op = isset($_GET['op']) ? DataValidator::validate_string($_GET['op']) : false;
$today_date = today_dateFN();
//$self = 'list_chatrooms'; // x template
//$self = whoami();
if ($op !== false && $op == 'course_info') {
    $serviceId = DataValidator::is_uinteger($_GET['id']);
    if ($serviceId !== false && $serviceId > 0) {
        $coursesAr = $common_dh->get_courses_for_service($serviceId);
        $thead_data = array(translateFN('edizione'), translateFN('data inizio previsto'), translateFN('data fine'), translateFN('crediti'), translateFN('azioni'));
        //$thead_data = array(translateFN('nome'), translateFN('data inizio previsto'), translateFN('durata'), translateFN('data fine'), translateFN('tutor'), translateFN('azioni'));
        $tbody_data = array();
        if (!AMA_Common_DataHandler::isError($coursesAr)) {
            $currentTesterId = 0;
            $currentTester = '';
            $tester_dh = null;
            foreach ($coursesAr as $courseData) {
开发者ID:eguicciardi,项目名称:ada,代码行数:31,代码来源:info.php

示例3: unset

 if (DataValidator::validate_string($_POST['user_country']) === FALSE) {
     $errorsAr['user_country'] = true;
 }
 if (DataValidator::validate_string($_POST['user_fiscal_code']) === FALSE) {
     $errorsAr['user_fiscal_code'] = true;
 }
 if (DataValidator::validate_birthdate($_POST['user_birthdate']) === FALSE) {
     $errorsAr['user_birthdate'] = true;
 }
 if (DataValidator::validate_not_empty_string($_POST['user_birthcity']) === FALSE) {
     $errorsAr['user_birthcity'] = true;
 }
 if (DataValidator::validate_string($_POST['user_birthprovince']) === FALSE) {
     $errorsAr['user_birthprovince'] = true;
 }
 if (DataValidator::validate_string($_POST['user_sex']) === FALSE) {
     $errorsAr['user_sex'] = true;
 }
 if (DataValidator::validate_phone($_POST['user_phone']) === FALSE) {
     $errorsAr['user_phone'] = true;
 }
 if (count($errorsAr) > 0) {
     unset($_POST['submit']);
     $user_dataAr = $_POST;
     $testers_dataAr = $common_dh->get_all_testers(array('id_tester', 'nome'));
     if (AMA_Common_DataHandler::isError($testers_dataAr)) {
         $errObj = new ADA_Error($testersAr, translateFN("Errore nell'ottenimento delle informazioni sui tester"));
     } else {
         $testersAr = array();
         foreach ($testers_dataAr as $tester_dataAr) {
             $testersAr[$tester_dataAr['puntatore']] = $tester_dataAr['nome'];
开发者ID:eguicciardi,项目名称:ada,代码行数:31,代码来源:add_user.php


注:本文中的DataValidator::validate_string方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。