Revision e80feccc
Von Christian Ehringfeld vor etwa 10 Jahren hinzugefügt
| samples/validators/address.cpp | ||
|---|---|---|
|
|
||
|
QList<ValidationRule> Address::validationRules() const {
|
||
|
QList<ValidationRule> rules = QList<ValidationRule>();
|
||
|
rules.append(ValidationRule("required", {"street", "postcode","label"}));
|
||
|
//rules.append(ValidationRule("required"));
|
||
|
rules.append(ValidationRule("required", {"street", "postcode", "city"}));
|
||
|
//German postcodes
|
||
|
rules.append(ValidationRule("number", "postcode", "min", 10000, "max", 99999));
|
||
|
return rules;
|
||
|
}
|
||
|
|
||
Auch abrufbar als: Unified diff
validator stuff