本文整理汇总了PHP中MVCUtils::includeFormValidator方法的典型用法代码示例。如果您正苦于以下问题:PHP MVCUtils::includeFormValidator方法的具体用法?PHP MVCUtils::includeFormValidator怎么用?PHP MVCUtils::includeFormValidator使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MVCUtils
的用法示例。
在下文中一共展示了MVCUtils::includeFormValidator方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isValid
<?php
/**
*
* @package DPS
*/
include_once $cfg['MVC']['dir']['root'] . '/MVCUtils.class.php';
MVCUtils::includeValidator('ValidatorRule', 'MVC');
MVCUtils::includeFormValidator('FormValidator', 'tkfecomon');
/**
* Check that a string is a valid name
*
*
*/
class DPSUserShowDetailsValidator extends FormValidator
{
//protected $fieldData;
//protected $formName;
//protected $errorFormName = false;
const module = 'DPS';
public function isValid()
{
global $cfg;
$db = Database::getInstance($cfg['MVC']['dsn']);
$rules = $db->getAll("SELECT vrclassname, description, fieldname, \r\n\t\t\tfieldvalidators.modulename FROM fieldvalidators, formfields \r\n\t\t\tWHERE formfields.ruleid = fieldvalidators.ruleid\r\n\t\t\tAND formname = '{$this->formName}'");
//This statement has been removed from the where clause:
//modulename = '{$this->fieldData['moduleName']}' AND
$invalidFields = array();
$sess = Session::getInstance();
// Validate the submitted fields
foreach ($rules as $rule) {