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


PHP FormValidator::FormValidator方法代码示例

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


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

示例1: FormValidatorArray

 /**
  * Constructor.
  * @param $form Form the associated form
  * @param $field string the name of the associated field
  * @param $type string the type of check, either "required" or "optional"
  * @param $message string the error message for validation failures (i18n key)
  * @param $fields array all subfields for each item in the array, i.e. name[][foo]. If empty it is assumed that name[] is a data field
  */
 function FormValidatorArray(&$form, $field, $type, $message, $fields = array(), $subArray = false)
 {
     parent::FormValidator($form, $field, $type, $message);
     $this->_fields = $fields;
     $this->_subArray = $subArray;
     $this->_errorFields = array();
 }
开发者ID:elavaud,项目名称:hrp_ct,代码行数:15,代码来源:FormValidatorArray.inc.php

示例2: FormValidatorArrayRadios

 /**
  * Constructor.
  * @param $form Form the associated form
  * @param $field string the name of the associated field
  * @param $type string the type of check, either "required" or "optional"
  * @param $message string the error message for validation failures (i18n key)
  * @param $radiofields array all the radio buttons to check.
  * @param $twoDim boolean specify if if this is a 2 dimensional array
  */
 function FormValidatorArrayRadios(&$form, $field, $type, $message, $radiofields, $twoDim = false)
 {
     parent::FormValidator($form, $field, $type, $message);
     $this->twoDimenstion = $twoDim;
     $this->_radiofields = $radiofields;
     $this->_errorFields = array();
 }
开发者ID:JovanyJeff,项目名称:hrp,代码行数:16,代码来源:FormValidatorArrayRadios.inc.php

示例3: FormValidatorCustom

 /**
  * Constructor.
  * The user function is passed the form data as its first argument and $additionalArguments, if set, as the remaining arguments. This function must return a boolean value.
  * @param $form Form the associated form
  * @param $field string the name of the associated field
  * @param $type string the type of check, either "required" or "optional"
  * @param $message string the error message for validation failures (i18n key)
  * @param $userFunction callable function the user function to use for validation
  * @param $additionalArguments array optional, a list of additional arguments to pass to $userFunction
  * @param $complementReturn boolean optional, complement the value returned by $userFunction
  */
 function FormValidatorCustom(&$form, $field, $type, $message, $userFunction, $additionalArguments = array(), $complementReturn = false)
 {
     parent::FormValidator($form, $field, $type, $message);
     $this->_userFunction = $userFunction;
     $this->_additionalArguments = $additionalArguments;
     $this->_complementReturn = $complementReturn;
 }
开发者ID:EreminDm,项目名称:water-cao,代码行数:18,代码来源:FormValidatorCustom.inc.php

示例4: FormValidatorDate

 /**
  * Constructor.
  * @param $form Form the associated form
  * @param $field string the name of the associated field
  * @param $type string the type of check, either "required" or "optional"
  * @param $message string the error message for validation failures (i18n key)
  * @param $dateFormat int the ValidatorDate date format to allow
  * @param $dateScope string the minimum resolution of a date to allow
  * @param $dateScope string the maximum resolution of a date to allow
  */
 function FormValidatorDate(&$form, $field, $type, $message, $dateFormat = DATE_FORMAT_ISO, $dateScopeMin = VALIDATOR_DATE_SCOPE_YEAR, $dateScopeMax = VALIDATOR_DATE_SCOPE_DAY)
 {
     $validator = new ValidatorDate($dateFormat);
     $this->_scopeMin = $dateScopeMin;
     $this->_scopeMax = $dateScopeMax;
     parent::FormValidator($form, $field, $type, $message, $validator);
 }
开发者ID:jprk,项目名称:pkp-lib,代码行数:17,代码来源:FormValidatorDate.inc.php

示例5: FormValidatorReCaptcha

 /**
  * Constructor.
  * @param $form object
  * @param $userIp string IP address of user request
  * @param $message string Key of message to display on mismatch
  */
 function FormValidatorReCaptcha(&$form, $challengeField, $responseField, $userIp, $message)
 {
     parent::FormValidator($form, $challengeField, FORM_VALIDATOR_REQUIRED_VALUE, $message);
     $this->_challengeField = $challengeField;
     $this->_responseField = $responseField;
     $this->_userIp = $userIp;
 }
开发者ID:doana,项目名称:pkp-lib,代码行数:13,代码来源:FormValidatorReCaptcha.inc.php

示例6: FormValidatorArrayCustom

 /**
  * Constructor.
  * @param $form Form the associated form
  * @param $field string the name of the associated field
  * @param $type string the type of check, either "required" or "optional"
  * @param $message string the error message for validation failures (i18n key)
  * @param $userFunction function the user function to use for validation
  * @param $additionalArguments array optional, a list of additional arguments to pass to $userFunction
  * @param $complementReturn boolean optional, complement the value returned by $userFunction
  * @param $fields array all subfields for each item in the array, i.e. name[][foo]. If empty it is assumed that name[] is a data field
  * @param $isLocaleField boolean
  */
 function FormValidatorArrayCustom(&$form, $field, $type, $message, $userFunction, $additionalArguments = array(), $complementReturn = false, $fields = array(), $isLocaleField = false)
 {
     parent::FormValidator($form, $field, $type, $message);
     $this->_fields = $fields;
     $this->_errorFields = array();
     $this->_isLocaleField = $isLocaleField;
     $this->_userFunction = $userFunction;
     $this->_additionalArguments = $additionalArguments;
     $this->_complementReturn = $complementReturn;
 }
开发者ID:EreminDm,项目名称:water-cao,代码行数:22,代码来源:FormValidatorArrayCustom.inc.php

示例7: FormValidatorPost

 /**
  * Constructor.
  * @param $form Form
  * @param $message string the locale key to use (optional)
  */
 function FormValidatorPost(&$form, $message = 'form.postRequired')
 {
     parent::FormValidator($form, 'dummy', FORM_VALIDATOR_REQUIRED_VALUE, $message);
 }
开发者ID:farhanabbas1983,项目名称:ojs-1,代码行数:9,代码来源:FormValidatorPost.inc.php

示例8: FormValidatorRegExp

 /**
  * Constructor.
  * @param $form Form the associated form
  * @param $field string the name of the associated field
  * @param $type string the type of check, either "required" or "optional"
  * @param $message string the error message for validation failures (i18n key)
  * @param $regExp string the regular expression (PCRE form)
  */
 function FormValidatorRegExp(&$form, $field, $type, $message, $regExp)
 {
     import('lib.pkp.classes.validation.ValidatorRegExp');
     $validator = new ValidatorRegExp($regExp);
     parent::FormValidator($form, $field, $type, $message, $validator);
 }
开发者ID:master3395,项目名称:CBPPlatform,代码行数:14,代码来源:FormValidatorRegExp.inc.php

示例9: FormValidatorCaptcha

 /**
  * Constructor.
  * @param $form object
  * @param $field string Name of captcha value submitted by user
  * @param $captchaIdField string Name of captcha ID field
  * @param $message string Key of message to display on mismatch
  */
 function FormValidatorCaptcha(&$form, $field, $captchaIdField, $message)
 {
     parent::FormValidator($form, $field, FORM_VALIDATOR_REQUIRED_VALUE, $message);
     $this->_captchaIdField = $captchaIdField;
 }
开发者ID:farhanabbas1983,项目名称:ojs-1,代码行数:12,代码来源:FormValidatorCaptcha.inc.php

示例10: FormValidatorRegExp

 /**
  * Constructor.
  * @see FormValidator::FormValidator()
  * @param $regExp string the regular expression (PCRE form)
  */
 function FormValidatorRegExp(&$form, $field, $type, $message, $regExp)
 {
     parent::FormValidator($form, $field, $type, $message);
     $this->regExp = $regExp;
 }
开发者ID:LiteratimBi,项目名称:jupitertfn,代码行数:10,代码来源:FormValidatorRegExp.inc.php

示例11: FormValidatorLength

 /**
  * Constructor.
  * @param $form Form the associated form
  * @param $field string the name of the associated field
  * @param $type string the type of check, either "required" or "optional"
  * @param $message string the error message for validation failures (i18n key)
  * @param $comparator
  * @param $length
  */
 function FormValidatorLength(&$form, $field, $type, $message, $comparator, $length)
 {
     parent::FormValidator($form, $field, $type, $message);
     $this->_comparator = $comparator;
     $this->_length = $length;
 }
开发者ID:JovanyJeff,项目名称:hrp,代码行数:15,代码来源:FormValidatorLength.inc.php

示例12: FormValidatorBoolean

 /**
  * Constructor.
  * @param $form Form the associated form
  * @param $field string the name of the associated field
  * @param $message string the error message for validation failures (i18n key)
  */
 function FormValidatorBoolean(&$form, $field, $message)
 {
     parent::FormValidator($form, $field, FORM_VALIDATOR_OPTIONAL_VALUE, $message);
 }
开发者ID:JovanyJeff,项目名称:hrp,代码行数:10,代码来源:FormValidatorBoolean.inc.php

示例13: FormValidatorArray

 /**
  * Constructor.
  * @see FormValidator::FormValidator()
  * @param $field string field name specifying an array of fields, i.e. name[]
  * @param $fields array all subfields for each item in the array, i.e. name[][foo]. If empty it is assumed that name[] is a data field
  */
 function FormValidatorArray(&$form, $field, $type, $message, $fields = array())
 {
     parent::FormValidator($form, $field, $type, $message);
     $this->fields = $fields;
     $this->errorFields = array();
 }
开发者ID:LiteratimBi,项目名称:jupitertfn,代码行数:12,代码来源:FormValidatorArray.inc.php

示例14: FormValidatorFileType

 function FormValidatorFileType(&$form, $field, $type, $message)
 {
     parent::FormValidator($form, $field, $type, $message, $this);
 }
开发者ID:ingmarschuster,项目名称:MindResearchRepository,代码行数:4,代码来源:FormValidatorFileType.inc.php

示例15: FormValidatorPost

 /**
  * Constructor.
  * @see FormValidator::FormValidator()
  * @param message string the locale key to use (optional)
  */
 function FormValidatorPost(&$form, $message = 'form.postRequired')
 {
     parent::FormValidator($form, 'dummy', 'required', $message);
 }
开发者ID:LiteratimBi,项目名称:jupitertfn,代码行数:9,代码来源:FormValidatorPost.inc.php


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