當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。