本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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');
}
示例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.');
}
示例6: configure
protected function configure($options = array(), $messages = array())
{
$this->options['required'] = false;
parent::configure($options, $messages);
$this->addRequiredOption('value_attribute_value');
}
示例7: configure
protected function configure($options = array(), $messages = array())
{
$this->addOption('readme_field', 'readme');
parent::configure($options, $messages);
}
示例8: configure
protected function configure($options = array(), $messages = array())
{
$this->addRequiredOption('petition_id');
$this->addRequiredOption('petition_text_id');
parent::configure($options, $messages);
}
示例9: configure
protected function configure($options = array(), $messages = array())
{
$this->addOption('login');
parent::configure($options, $messages);
}
示例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.');
}
示例11: configure
protected function configure($options = array(), $messages = array())
{
parent::configure($options, $messages);
// your validator configuration here
}
示例12: configure
protected function configure($options = array(), $messages = array())
{
parent::configure($options, $messages);
$this->addOption('enable_timerange', false);
}
示例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.');
}