-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvalidator.h
executable file
·50 lines (40 loc) · 2.25 KB
/
validator.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef VALIDATOR_H
#define VALIDATOR_H
#include <QString>
#include <QRegExp>
#include <QValidator>
#include <QDate>
#include <QDebug>
class Validator
{
public:
Validator();
bool registerNewPersonInputValidator(const QString& firstname,
const QString& lastname,
const QString& street,
const QString& municipality,
const QString& zip,
const QString& province,
const QString& personal_code,
const QString& job,
const QString& license,
const QDate& date_of_issue,
const QString& email,
const QString& phone );
bool FirstNameValidator(const QString& Nome, QString &&firstname = "");
bool LastNameValidator(const QString& Cognome, QString &&lastname = "");
bool NomeValidator(const QString& Nome, const QString& Cognome, QString&& firstname = "", QString&& lastname = "");
bool ViaValidator(const QString& Via, QString&& street = "");
bool ComuneValidator(const QString& Comune, QString&& municipality = "");
bool CapValidator(const QString& Cap, QString &&zip = 0);
bool ProvinciaValidator(const QString& Provincia, QString&& province = "");
bool ProfessioneValidator(const QString& Professione, QString&& job = "");
bool CodiceFiscaleValidator(const QString& CodiceFiscale, QString&& personal_code = "");
bool TelefonoValidator(const QString& Telefono, QString&& phone = "");
bool EmailValidator(const QString& Email, QString&& email = "");
bool AnnoValidator(const QDate& Anno, int&& year = 0);
bool ValiditaValidator(const QString& is_valid, bool &validity);
bool EmailTelefonoValidator(const QString& Email, const QString& Telefono, QString&& email = "", QString&& phone = "");
private:
};
#endif // VALIDATOR_H