VirtualBox

Changeset 93823 in vbox


Ignore:
Timestamp:
Feb 17, 2022 11:00:08 AM (3 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9515. Modifying hostname validator's regex.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIHostnameDomainNameEditor.cpp

    r93791 r93823  
    6363    if (m_pHostnameLineEdit)
    6464        m_pHostnameLineEdit->mark(!m_pHostnameLineEdit->hasAcceptableInput(),
    65                                   tr("Hostname should be at least 2 character lomg. Allowed characters are alphanumerics, \"-\" and \".\""));
     65                                  tr("Hostname should be at least 2 character long. Allowed characters are alphanumerics, \"-\" and \".\""));
    6666    if (m_pDomainNameLineEdit)
    6767        m_pDomainNameLineEdit->mark(!m_pDomainNameLineEdit->hasAcceptableInput(),
    68                                   tr("Domain name should be at least 2 character lomg. Allowed characters are alphanumerics, \"-\" and \".\""));
     68                                  tr("Domain name should be at least 2 character long. Allowed characters are alphanumerics, \"-\" and \".\""));
    6969}
    7070
     
    159159    /* Host name and domain should be strings of minimum length of 2 and composed of alpha numerics, '-', and '.'
    160160     * Exclude strings with . at the end: */
    161     m_pHostnameLineEdit->setValidator(new QRegularExpressionValidator(QRegularExpression("^[a-zA-Z0-9-.]{2,}[^$.]"), this));
    162     m_pDomainNameLineEdit->setValidator(new QRegularExpressionValidator(QRegularExpression("^[a-zA-Z0-9-.]{2,}[^$.]"), this));
     161    m_pHostnameLineEdit->setValidator(new QRegularExpressionValidator(QRegularExpression("^[a-zA-Z0-9-.]{2,}[$a-zA-Z0-9-]"), this));
     162    m_pDomainNameLineEdit->setValidator(new QRegularExpressionValidator(QRegularExpression("^[a-zA-Z0-9-.]{2,}[$a-zA-Z0-9-]"), this));
    163163
    164164    connect(m_pHostnameLineEdit, &QILineEdit::textChanged,
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette