qml: Impose limits on usernames, hostnames

This commit is contained in:
Tom Dewey 2023-11-21 15:40:31 +00:00 committed by Tom Dewey
parent 89d1ef40d7
commit 71dffe4d6e

View file

@ -98,6 +98,7 @@ Window {
enabled: chkHostname.checked
text: "raspberrypi"
selectByMouse: true
maximumLength: 253
validator: RegularExpressionValidator { regularExpression: /[0-9A-Za-z][0-9A-Za-z-]{0,62}/ }
}
Text {
@ -139,6 +140,7 @@ Window {
Layout.minimumWidth: 200
selectByMouse: true
property bool indicateError: false
maximumLength: 31
onTextEdited: {
indicateError = false