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


PHP sfValidatorBase::configure方法代码示例

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


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

示例1: configure

 public function configure($options = array(), $messages = array())
 {
     $this->addOption('date_format_error', 'F jS, Y');
     $this->addOption('does_occur', true);
     $this->setMessage('invalid', 'Date range %range% and range %item% %does_occur% overlap');
     parent::configure($options, $messages);
 }
开发者ID:bshaffer,项目名称:Symfony-Snippets,代码行数:7,代码来源:sfValidatorOccursInRange.class.php

示例2: configure

 /**
  * options:
  *    * form: Required sfForm instance to validate
  *    * archiver: provide an archiver to sanitize results into a specific format (XML, YAML, etc).  Default is array.
  *    * throw_form_errors: whether or not to include validation errors in output
  *
  * messages:
  *    * invalid: error message to throw if validation fails
  *
  * @param string $options 
  * @param string $messages 
  * @return null
  * @author Brent Shaffer
  */
 protected function configure($options = array(), $messages = array())
 {
     $this->addRequiredOption('form');
     $this->addOption('throw_form_errors', true);
     $this->addOption('archiver');
     $this->addMessage('invalid', 'Your form contains some errors');
     parent::configure($options, $messages);
 }
开发者ID:bshaffer,项目名称:Symfony-Snippets,代码行数:22,代码来源:sfValidatorEmbeddedForm.class.php

示例3: configure

 public function configure($options = array(), $messages = array())
 {
     $this->addOption('sso_key_field', 'sso_key');
     $this->addOption('throw_global_error', false);
     $this->addRequiredOption('sso_fetcher');
     $this->setMessage('invalid', 'The sso key is invalid.');
     parent::configure($options, $messages);
 }
开发者ID:KnpLabs,项目名称:knpSsoPlugin,代码行数:8,代码来源:knpSsoValidatorUser.class.php

示例4: configure

 /**
  * Configures the current validator.
  *
  * Available options:
  *
  *  * from_time:   The from time validator (required)
  *  * to_time:     The to time validator (required)
  *  * from_field:  The name of the "from" date field (optional, default: from)
  *  * to_field:    The name of the "to" date field (optional, default: to)
  *
  * @param array $options    An array of options
  * @param array $messages   An array of error messages
  *
  * @see sfValidatorBase
  */
 protected function configure($options = array(), $messages = array())
 {
     parent::configure($options, $messages);
     $this->setMessage('invalid', 'From time should be before to time.');
     $this->addRequiredOption('from_time');
     $this->addRequiredOption('to_time');
     $this->addOption('from_field', 'from');
     $this->addOption('to_field', 'to');
 }
开发者ID:lahirwisada,项目名称:orangehrm,代码行数:24,代码来源:ohrmValidatorTimeRange.php

示例5: configure

 protected function configure($options = array(), $messages = array())
 {
     parent::configure($options, $messages);
     $this->addMessage('incorrect_format', 'Le format est incorrect.');
     $this->addMessage('incorrect_year', 'L\'année est incorrecte.');
     $this->addMessage('incorrect_month', 'Le mois est incorrect.');
     $this->addMessage('incorrect_day', 'Le jour est incorrect.');
     $this->addMessage('incorrect_time_hours', 'L\'heure est incorrecte.');
     $this->addMessage('incorrect_time_minutes', 'Les minutes sont incorrectes.');
 }
开发者ID:TheoJD,项目名称:portail,代码行数:10,代码来源:sfValidatorDatePicker.php

示例6: configure

 protected function configure($options = array(), $messages = array())
 {
     $this->options['required'] = false;
     parent::configure($options, $messages);
     $this->addRequiredOption('value_attribute_value');
 }
开发者ID:uniteddiversity,项目名称:policat,代码行数:6,代码来源:ValidatorInverseCheckbox.class.php

示例7: configure

 protected function configure($options = array(), $messages = array())
 {
     $this->addOption('readme_field', 'readme');
     parent::configure($options, $messages);
 }
开发者ID:pkdevbox,项目名称:mootools-forge,代码行数:5,代码来源:appValidatorForgeMD.class.php

示例8: configure

 protected function configure($options = array(), $messages = array())
 {
     $this->addRequiredOption('petition_id');
     $this->addRequiredOption('petition_text_id');
     parent::configure($options, $messages);
 }
开发者ID:uniteddiversity,项目名称:policat,代码行数:6,代码来源:ValidatorPetitionText.class.php

示例9: configure

 protected function configure($options = array(), $messages = array())
 {
     $this->addOption('login');
     parent::configure($options, $messages);
 }
开发者ID:eyumay,项目名称:srms.psco,代码行数:5,代码来源:srmsValidators.php

示例10: configure

 protected function configure($options = array(), $messages = array())
 {
     parent::configure($options, $messages);
     // $this->addRequiredOption('cedula');
     $this->addMessage('invalid_cedula', 'La cedula es invalida es decir no existe o no es un numero.');
 }
开发者ID:qwerfaqs,项目名称:psicotest,代码行数:6,代码来源:validarCedula.php

示例11: configure

 protected function configure($options = array(), $messages = array())
 {
     parent::configure($options, $messages);
     // your validator configuration here
 }
开发者ID:nick-keller,项目名称:sfHfLan,代码行数:5,代码来源:sfValidatorBooking.php

示例12: configure

 protected function configure($options = array(), $messages = array())
 {
     parent::configure($options, $messages);
     $this->addOption('enable_timerange', false);
 }
开发者ID:nvidela,项目名称:kimkelen,代码行数:5,代码来源:alValidatorTimepicker.class.php

示例13: configure

 protected function configure($options = array(), $messages = array())
 {
     parent::configure($options, $messages);
     $this->addOption('rt_shop_order', null);
     $this->addMessage('code', isset($messages['code']) ? $messages['code'] : 'Voucher code is invalid. Please check.');
 }
开发者ID:pierswarmers,项目名称:rtShopPlugin,代码行数:6,代码来源:rtShopVoucherValidator.class.php


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