本文整理汇总了PHP中validator::isTaken方法的典型用法代码示例。如果您正苦于以下问题:PHP validator::isTaken方法的具体用法?PHP validator::isTaken怎么用?PHP validator::isTaken使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类validator
的用法示例。
在下文中一共展示了validator::isTaken方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
'password' => 'Password'
);
if (! $this->dOutput['form']['editing'])
{
$uniqueItems = array (
'user' => 'User'
);
} else
{
$uniqueItems = array (
);
}
$dValidator = new validator($this->db);
$this->dOutput['form']['validation']['existant'] = $dValidator->arrayItems($this->dOutput['form']['data'],
$necessaryItems);
$this->dOutput['form']['validation']['untaken'] = $dValidator->isTaken($this->dOutput['form']['data'], $uniqueItems,
'qbUsers');
if (! isset($this->dOutput['form']['validation']['existant']['invalid']) && ! isset(
$this->dOutput['form']['validation']['untaken']['invalid']))
{
# Telling template all went okay
$this->dOutput['form']['validation']['passed'] = true;
# Sanitizing our input
foreach ($this->dOutput['form']['data'] as $k => $v)
{
$cleanData[$k] = $this->db->escape($v);
}
$passwd = janitor::passwd($cleanData['password']);
# Queries are here.
if ($this->dOutput['form']['editing'])
{