Modify Hostname input validation to accept number as first character

Input validation for Hostname accept a letter or a digit as the first character to conform to [rfc1123](http://tools.ietf.org/html/rfc1123#page-13 ) . Fixing [CAL-346](https://calamares.io/bugs/browse/CAL-346)
This commit is contained in:
Tith Chantara 2016-02-23 15:32:29 +07:00
parent 2ccfd9e50e
commit 80864bdf27

View file

@ -65,7 +65,7 @@ private:
Ui::Page_UserSetup* ui;
const QRegExp USERNAME_RX = QRegExp( "^[a-z_][a-z0-9_-]*[$]?$" );
const QRegExp HOSTNAME_RX = QRegExp( "^[a-zA-Z][-a-zA-Z0-9_]*$" );
const QRegExp HOSTNAME_RX = QRegExp( "^[a-zA-Z0-9][-a-zA-Z0-9_]*$" );
const int USERNAME_MAX_LENGTH = 31;
const int HOSTNAME_MIN_LENGTH = 2;
const int HOSTNAME_MAX_LENGTH = 24;