本文整理匯總了PHP中FORM::num_errors方法的典型用法代碼示例。如果您正苦於以下問題:PHP FORM::num_errors方法的具體用法?PHP FORM::num_errors怎麽用?PHP FORM::num_errors使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類FORM
的用法示例。
在下文中一共展示了FORM::num_errors方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: continue_validating
/**
* Does this field need validation?
* This will return True only if the field has not already generated an error and it has content.
* Descendents use this function to determine whether to continue validation or not.
* @param FORM $form
* @return boolean
*/
public function continue_validating($form)
{
return !$this->is_empty() && !$form->num_errors($this->id);
}
示例2: needs_visible
/**
* Are there errors or values for these fields?
* @param FORM $form
* @return boolean
*/
public function needs_visible($form)
{
/** @var $date_before DATE_TIME */
$date_before = $form->value_for($this->before_name());
/** @var $date_after DATE_TIME */
$date_after = $form->value_for($this->after_name());
return $date_before->is_valid() || $form->num_errors($this->before_name()) || $date_after->is_valid() || $form->num_errors($this->after_name()) || $form->value_for($this->search_type_name()) != Search_date_constant;
}