source: SMSSender/gateways/SwisscomXtraZone/src/business/validation/BCAccountValidator.cpp @ 71:415b45c71663

3.0
Last change on this file since 71:415b45c71663 was 71:415b45c71663, checked in by Sämy Zehnder <saemy.zehnder@…>, 12 years ago
  • Reorganized all the libraries. libinterfaces and libgateways are removed now and libdatatypes contains now all these files.
File size: 517 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
12namespace SwisscomXtraZone {
13
14IValidationResult* BCAccountValidator::validate() const {
15    IValidationResult* result = SLoginAccountValidator::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.