3.0
Last change
on this file since 42:63df32d07e95 was
42:63df32d07e95,
checked in by Sämy Zehnder <saemy.zehnder@…>, 12 years ago
|
- Rearranged util- and data-type-class-files (Created libdatatypes, libutils)
- Started with translation of SwisscomXtraZone? strings
- New contactList fetches now names as well as aliases.
- Segmentationfault in SwisscomXtraZone?-plugin is fixed.
- Started with account->enabled() stuff.
- It's not really usable at the moment, but its getting better :)
(Had some conflicts before -> the last commits are connected to this one)
|
File size:
518 bytes
|
Line | |
---|
1 | /* |
---|
2 | * BCAccountValidator.cpp |
---|
3 | * |
---|
4 | * Created on: Dec 20, 2009 |
---|
5 | * Author: saemy |
---|
6 | */ |
---|
7 | |
---|
8 | #include "BCAccountValidator.h" |
---|
9 | |
---|
10 | #include <QRegExp> |
---|
11 | |
---|
12 | namespace SwisscomXtraZone { |
---|
13 | |
---|
14 | IValidationResult* BCAccountValidator::validate() const { |
---|
15 | IValidationResult* result = BCLoginAccountValidator::validate(); |
---|
16 | |
---|
17 | if (account()->username().contains(QRegExp("[^\\d]")) || (account()->username().length() != 10)) { |
---|
18 | result->addError(tr("The mobile number should be of the form 0791234567.")); |
---|
19 | } |
---|
20 | |
---|
21 | return result; |
---|
22 | } |
---|
23 | |
---|
24 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.