bool isValidName(QString name){
QString pattern("[a-zA-Z0-9,.\\-_]{1,32}");
QRegExp rx(pattern);
bool match = rx.exactMatch(name);
return match;
}
bool isValidPassword(QString password){
QString pattern("[a-zA-Z0-9,.\\-_~!@#$%^&*()+=\\{\\}\\[\\]'\"?|\\\/\\\\]{4,20}");
QRegExp rx(pattern);
bool match = rx.exactMatch(password);
return match;
}
|