I am trying to create TextInputfor IP addresses and I need to manage ranges ( 0-255).
I used the validator regExpas well as inputMaskfrom "000.000.000.000;0", but it canceled the validator.
How to create an IP validation template with an input mask?
TextInput
{
id: myLineEdit
anchors.fill: parent
cursorVisible: true
focus: true
validator:RegExpValidator
{
regExp:/^(([01]?[0-9]?[0-9]|2([0-4][0-9]|5[0-5]))\.){3}([01]?[0-9]?[0-9]|2([0-4][0-9]|5[0-5]))$/
}
inputMask: "000.000.000.000;0"
}
source
share