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


PHP DataValidator::DataValidator方法代码示例

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


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

示例1: __construct

 /**
  * @return DataValidator
  * @param array $a_keys
  * @param string $s_message
  * @param int $i_mode
  * @param IHasShortUrl $object_with_short_url
  * @desc Creates a new ShortUrlValidator
  */
 public function __construct($a_keys, $s_message, $i_mode, IHasShortUrl $object_with_short_url)
 {
     parent::DataValidator($a_keys, $s_message, $i_mode);
     $this->object_with_short_url = $object_with_short_url;
 }
开发者ID:stoolball-england,项目名称:stoolball-england-website,代码行数:13,代码来源:short-url-validator.class.php

示例2: __construct

 /**
  * @return DataValidator
  * @param array $a_keys
  * @param string $s_message
  * @desc Creates a new ShortUrlValidator
  */
 public function __construct($a_keys)
 {
     parent::DataValidator($a_keys, 'The email address you chose, {0}, is already in use. Please chose a different one.');
 }
开发者ID:stoolball-england,项目名称:stoolball-england-website,代码行数:10,代码来源:email-registered-validator.class.php

示例3: __construct

 /**
  * Creates a new TeamNameValidator
  * @param string[] $a_keys
  * @param string $message
  * @return void
  */
 public function __construct($a_keys, $message)
 {
     parent::DataValidator($a_keys, $message, ValidatorMode::MultiField());
 }
开发者ID:stoolball-england,项目名称:stoolball-england-website,代码行数:10,代码来源:team-name-validator.class.php

示例4: __construct

 /**
  * @return DateValidator
  * @param array $a_keys
  * @param string $s_message
  * @param int $i_mode
  * @desc Constructor for all validators - can be used as inherited constructor
  */
 public function __construct($a_keys, $s_message, $i_mode = null)
 {
     parent::DataValidator($a_keys, $s_message, $i_mode);
 }
开发者ID:stoolball-england,项目名称:stoolball-england-website,代码行数:11,代码来源:date-validator.class.php

示例5: __construct

 /**
  * Creates a MutuallyExclusiveValidator
  * @param string[] $field_names
  * @param string $message
  * @param string[] $default_values
  * @param int $i_mode
  * @return void
  */
 public function __construct($field_names, $message, $default_values, $i_mode = null)
 {
     parent::DataValidator($field_names, $message, $i_mode);
     $this->default_values = is_array($default_values) ? $default_values : array();
 }
开发者ID:stoolball-england,项目名称:stoolball-england-website,代码行数:13,代码来源:mutually-exclusive-validator.class.php

示例6: __construct

 /**
  * @return WordsValidator
  * @param array $a_keys
  * @param string $s_message
  * @param int $i_minlength Minimum number of words, below which the field(s) will not validate
  * @param int $i_maxlength Maximum number of words, above which the field(s) will not validate
  * @param int $i_mode
  * @desc Constructor for all validators - can be used as inherited constructor
  */
 public function __construct($a_keys, $s_message, $i_minlength, $i_maxlength, $i_mode = null)
 {
     parent::DataValidator($a_keys, $s_message, $i_mode);
     $this->i_minlength = (int) $i_minlength;
     $this->i_maxlength = $i_maxlength == null ? 10000000 : (int) $i_maxlength;
 }
开发者ID:stoolball-england,项目名称:stoolball-england-website,代码行数:15,代码来源:words-validator.class.php

示例7:

 /**
  * @return NumericRangeValidator
  * @param array $a_keys
  * @param string $s_message
  * @param int $i_min Minimum value, below which the field(s) will not validate
  * @param int $i_max Maximum value, above which the field(s) will not validate
  * @param int $i_mode
  * @desc Constructor for all validators - can be used as inherited constructor
  */
 function __construct($a_keys, $s_message, $i_min, $i_max, $i_mode = null)
 {
     parent::DataValidator($a_keys, $s_message, $i_mode);
     $this->i_min = is_null($i_min) ? null : (double) $i_min;
     $this->i_max = is_null($i_max) ? null : (double) $i_max;
 }
开发者ID:stoolball-england,项目名称:stoolball-england-website,代码行数:15,代码来源:numeric-range-validator.class.php

示例8: CompareValidator

 /**
  * @return CompareValidator
  * @param array $a_keys
  * @param string $s_message
  * @desc Test whether given fields are the same
  */
 function CompareValidator($a_keys, $s_message)
 {
     parent::DataValidator($a_keys, $s_message, ValidatorMode::MultiField());
 }
开发者ID:stoolball-england,项目名称:stoolball-england-website,代码行数:10,代码来源:compare-validator.class.php

示例9: __construct

 /**
  * @return RequiresOtherFieldsValidator
  * @param array Validated field followed by other required fields $a_keys
  * @param string $s_message
  * @param array(array()) Acceptable values in required fields $requires_values
  * @desc If the first given field has data, require the subsequent fields
  */
 public function __construct($a_keys, $s_message, $requires_values = null)
 {
     parent::DataValidator($a_keys, $s_message, ValidatorMode::MultiField());
     $this->requires_values = is_array($requires_values) ? $requires_values : array();
 }
开发者ID:stoolball-england,项目名称:stoolball-england-website,代码行数:12,代码来源:requires-other-fields-validator.class.php

示例10:

 /**
  * @return NumericValidator
  * @param array $a_keys
  * @param string $s_message
  * @param int $i_mode
  * @desc Constructor for numeric validator
  */
 function &NumericValidator($a_keys, $s_message, $i_mode = null)
 {
     parent::DataValidator($a_keys, $s_message, $i_mode);
     return $this;
 }
开发者ID:stoolball-england,项目名称:stoolball-england-website,代码行数:12,代码来源:numeric-validator.class.php

示例11:

 /**
  * @return RegExValidator
  * @param array $a_keys
  * @param string $s_message
  * @param string $s_pattern The regular expression to match
  * @param int $i_mode
  * @param bool $valid_if_match
  * @desc Validate fields' values against a regular expression
  */
 function __construct($a_keys, $s_message, $s_pattern, $i_mode = null, $valid_if_match = true)
 {
     parent::DataValidator($a_keys, $s_message, $i_mode);
     $this->s_pattern = (string) $s_pattern;
     $this->valid_if_match = (bool) $valid_if_match;
 }
开发者ID:stoolball-england,项目名称:stoolball-england-website,代码行数:15,代码来源:regex-validator.class.php


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