/** * @param array $options * @param array $messages */ protected function configure($options = array(), $messages = array()) { parent::configure($options, $messages); $this->addMessage('busy_name', 'A project with that name already exists'); $this->addOption('user_id'); $this->addOption('decision_id'); }
/** * Valid format for a norwegian SSN is DDMMYY\d\d\d\d\d * * @see sfValidatorRegex */ protected function configure($options = array(), $messages = array()) { $this->addOption('full_required', true); $this->addMessage('invalid', '%field% contains an invalid Norwegian social security number (11 digits)'); $this->addMessage('invalid2', '%field% contains an invalid Norwegian social security number (6 or 11 digits)'); parent::configure($options, $messages); }
protected function configure($options = array(), $messages = array()) { parent::configure($options, $messages); $this->addOption('trim'); $this->addOption('tolower'); $this->addOption('strip'); }
protected function configure($options = array(), $messages = array()) { parent::configure($options, $messages); $this->addOption('implements'); $this->addMessage('notfound', 'This PHP class does not exist.'); $this->addMessage('notimplement', 'This PHP class does not implement %implements%.'); }
protected function configure($options = array(), $messages = array()) { parent::configure($options, $messages); $this->addOption('max_length', 10); $this->addOption('min_length', 10); $this->addMessage('max_length', 'The phone number you entered was too long.'); $this->addMessage('min_length', 'The phone number you entered was too short.'); }
protected function configure($options = array(), $messages = array()) { parent::configure($options, $messages); $this->addMessage('max_length', 'Invalid state.'); $this->addMessage('min_length', 'Invalid state.'); $this->setOption('max_length', 2); $this->setOption('min_length', 2); }
protected function configure($options = array(), $messages = array()) { parent::configure($options, $messages); $this->setMessage('required', isset($messages['required']) ? $messages['required'] : 'Obrigatório.'); $this->setMessage('invalid', isset($messages['invalid']) ? $messages['invalid'] : 'Preenchimento incorreto.'); $this->setMessage('min_length', isset($messages['min_length']) ? $messages['min_length'] : 'Valor muito curto. Preencha pelo menos %min_length% caracteres.'); $this->setMessage('max_length', isset($messages['max_length']) ? $messages['max_length'] : 'Valor muito longo. Preencha no máximo %max_length% caracteres.'); }
protected function configure($options = array(), $messages = array()) { parent::configure($options, $messages); $this->setOption('required', false); $this->setOption('trim', true); $this->setOption('empty_value', '@homepage'); $this->addOption('logout_uri', 'member/logout'); }
protected function configure($options = array(), $messages = array()) { parent::configure($options, $messages); $this->addMessage('max_length', 'Password is too long (%max_length% characters max).'); $this->addMessage('min_length', 'Password is too short (%min_length% characters min).'); $this->addMessage('number', 'Password requires at least one number.'); $this->addMessage('upper', 'Password requires at least one capital letter.'); $this->addMessage('lower', 'Password requires at least one letter.'); }
/** * Configures the current validator. * * @param array $options An array of options * @param array $messages An array of error messages * * @see sfValidatorBase */ protected function configure($options = array(), $messages = array()) { $this->addOption('allow_slashes', false); // If strict is false, doClean will just clean the slug (potentially changing it). // If strict is true, it will reject slugs that are not already clean. // The latter is probably best when users are explicitly editing slugs $this->addOption('strict', true); parent::configure($options, $messages); }
protected function configure($options = array(), $messages = array()) { parent::configure($options, $messages); $this->setOption('trim', true); $this->setOption('min_length', 2); $this->setOption('max_length', 100); $this->addOption('match'); $this->addMessage('match', 'Please try with valid value'); $this->addMessage('required', 'This field is required!'); }
/** * Configures the current validator. * * Available options: * * * separator: the character between the left and the right part * * max_left: The maximum number of digits in the left part * * max_right: The maximum number of digits in the right part * * @param array $options An array of options * @param array $messages An array of error messages * * @see sfValidatorString */ protected function configure($options = array(), $messages = array()) { // configure parent::configure($options, $messages); $this->setMessage('invalid', 'the value %value% uses too many places right of the decimal. Only %max_right% allowed'); // add the options and set the default values $this->addOption('separator', self::$separator_default); $this->addOption('max_left', self::$max_left_default); $this->addOption('max_right', self::$max_right_default); $this->addOption('min'); $this->addOption('max'); }
/** * * Configures the current validator. * @param array $options An array of options * @param array $messages An array of error messages * @see sfValidatorBase */ protected function configure($options = array(), $messages = array()) { // Typically you'll set both of these if you're using it for page slugs, // and set neither for media item or blog post slugs $this->addOption('allow_slashes', false); $this->addOption('require_leading_slash', false); // If strict is false, doClean will just clean the slug (potentially changing it). // If strict is true, it will reject slugs that are not already clean. // The latter is probably best when users are explicitly editing slugs $this->addOption('strict', true); parent::configure($options, $messages); }
/** * Configures the current validator. * * @param array $options An array of options * @param array $messages An array of error messages * * @see sfValidatorBase */ protected function configure($options = array(), $messages = array()) { $this->addMessage('allowed_tags', 'Your field contains unsupported HTML tags.'); // See aHtml::simplify for the meaning of these options $this->addOption('allowed_tags', null); $this->addOption('allowed_attributes', null); $this->addOption('allowed_styles', null); $this->addOption('complete', false); $this->addOption('strip', true); // Mandatory. We don't complain about HTML here, we clean it $this->setOption('strip', true); parent::configure($options, $messages); }
/** * @see sfValidator */ protected function configure($options = array(), $messages = array()) { parent::configure($options, $messages); $this->addMessage('invalid', 'A cím nem megfelelő, vagy hiányos'); }
protected function configure($options = array(), $messages = array()) { $this->addMessage('not_a_question', 'Provided question should start with a \'question\' word, like \'How do I ...\' or \'Where can I find...\'. Your question starts with \'%first%\' though.'); $this->addOption('words', array('who', 'what', 'when', 'where', 'how', 'whom', 'whose', 'which', 'why')); parent::configure($options, $messages); }
/** * Configures the current validator. * * Available options: * * * demiliter_pattern * * @param array $options An array of options * @param array $messages An array of messages * * @see sfValidatorString */ protected function configure($options = array(), $messages = array()) { $this->addOption('demiliter_pattern', '/[\\s ]+/u'); parent::configure($options, $messages); }
/** * Configures the current validator. * * Available options: * * * pattern: A regex pattern compatible with PCRE (required) * * @param array $options An array of options * @param array $messages An array of error messages * * @see sfValidatorString */ protected function configure($options = array(), $messages = array()) { parent::configure($options, $messages); $this->addRequiredOption('pattern'); }
protected function configure($options = array(), $messages = array()) { parent::configure($options, $messages); $this->setOption('empty_value', null); }
protected function configure($options = array(), $messages = array()) { parent::configure($options, $messages); $this->addOption('ltrim', false); $this->addOption('rtrim', false); }
protected function configure($options = array(), $messages = array()) { parent::configure($options, $messages); $this->setOption('empty_value', array()); $this->setOption('required', false); $this->setOption('trim', true); $this->addMessage('invalid', 'Please enter a comma separated list of cultures.'); }
public function configure($options = array(), $messages = array()) { parent::configure($options, $messages); $this->setMessage('invalid', 'This field cannot contain <, > or & characters.'); }
protected function configure($options = array(), $messages = array()) { parent::configure($options, $messages); }
protected function configure($options = array(), $messages = array()) { parent::configure($options, $messages); $this->addRequiredOption('keywords'); $this->addMessage('missing', 'Missing the following keywords: %keywords%'); }
public function configure($options = array(), $messages = array()) { parent::configure($options, $messages); $this->setMessage('invalid', 'Please supply a valid IPv4 address'); }
protected function configure($options = array(), $messages = array()) { $this->addOption('id'); $this->addMessage('id', 'The entry id has not been specified.'); parent::configure($options, $messages); }
public function configure($options = array(), $messages = array()) { $this->addOption('version', self::IP_ALL); parent::configure($options, $messages); $this->setMessage('invalid', 'Ip address is invalid'); }
protected function configure($options = array(), $messages = array()) { parent::configure($options, $messages); $this->setMessage('invalid', 'This is not a valid YAML definition.'); }
protected function configure($options = array(), $messages = array()) { parent::configure($options, $messages); $this->setMessage('invalid', '"%value%" is not a valid directory name.'); }