protected function buildValidationRules()
 {
     $rules = new RuleList();
     $options = $this->getOptions();
     $rules->push(new EmailListRule('valid-email-list', $options));
     return $rules;
 }
Beispiel #2
0
 protected function buildValidationRules()
 {
     $rules = new RuleList();
     $options = $this->getOptions();
     $rules->push(new IntegerRule('valid-integer', $options));
     return $rules;
 }
Beispiel #3
0
 protected function buildValidationRules()
 {
     $rules = new RuleList();
     $options = $this->getOptions();
     $rules->push(new UuidRule('valid-uuidv4', $options));
     return $rules;
 }
Beispiel #4
0
 protected function buildValidationRules()
 {
     $rules = new RuleList();
     $options = $this->getOptions();
     $rules->push(new GeoPointRule('valid-geopoint', $options));
     return $rules;
 }
Beispiel #5
0
 protected function buildValidationRules()
 {
     $rules = new RuleList();
     $options = $this->getOptions();
     $valid_date_rule = new DateRule('valid-date', $options);
     $rules->push($valid_date_rule);
     return $rules;
 }
Beispiel #6
0
 protected function buildValidationRules()
 {
     $rules = new RuleList();
     $options = $this->getOptions();
     if (!array_key_exists(self::OPTION_ALLOW_CRLF, $options)) {
         $options[self::OPTION_ALLOW_CRLF] = true;
     }
     if (!array_key_exists(self::OPTION_ALLOW_TAB, $options)) {
         $options[self::OPTION_ALLOW_TAB] = true;
     }
     $rules->push(new TextRule('valid-text', $options));
     return $rules;
 }
 protected function buildValidationRules()
 {
     $rules = new RuleList();
     $options = [];
     if ($this->hasOption(self::OPTION_MIN_TIMESTAMP)) {
         $options[self::OPTION_MIN_TIMESTAMP] = $this->getOption(self::OPTION_MIN_TIMESTAMP);
     }
     if ($this->hasOption(self::OPTION_MAX_TIMESTAMP)) {
         $options[self::OPTION_MAX_TIMESTAMP] = $this->getOption(self::OPTION_MAX_TIMESTAMP);
     }
     $options[self::OPTION_FORCE_INTERNAL_TIMEZONE] = $this->getOption(self::OPTION_FORCE_INTERNAL_TIMEZONE, self::DEFAULT_FORCE_INTERNAL_TIMEZONE);
     $options[self::OPTION_INTERNAL_TIMEZONE_NAME] = $this->getOption(self::OPTION_INTERNAL_TIMEZONE_NAME, self::DEFAULT_INTERNAL_TIMEZONE_NAME);
     $valid_datetime_rule = new TimestampRule('valid-timestamp', $options);
     $rules->push($valid_datetime_rule);
     return $rules;
 }
Beispiel #8
0
 protected function buildValidationRules()
 {
     $rules = new RuleList();
     $rules->push(new TextRule('valid-text', $this->getOptions()));
     return $rules;
 }
 /**
  * Return a list of rules used to validate a specific attribute instance's value.
  *
  * @return RuleList
  */
 protected function buildValidationRules()
 {
     $rules = new RuleList();
     $options = $this->getOptions();
     $options[self::OPTION_ENTITY_TYPES] = $this->getEmbeddedEntityTypeMap();
     $rules->push(new EmbeddedEntityListRule('valid-embedded-entity-list-data', $options));
     return $rules;
 }
Beispiel #10
0
 protected function buildValidationRules()
 {
     $rules = new RuleList();
     $rules->push(new EmailRule('email-type', $this->getOptions()));
     return $rules;
 }
Beispiel #11
0
 protected function buildValidationRules()
 {
     $rules = new RuleList();
     $rules->push(new BooleanRule('valid-boolean'));
     return $rules;
 }