import QtQuick 2.6 import QtQuick.Controls 1.0 ApplicationWindow { title: "validator ignored with input mask" width: 350; height: 90 visible: true TextInput { id: input anchors.fill: parent horizontalAlignment: TextInput.AlignHCenter; verticalAlignment: TextInput.AlignVCenter text: "+1" inputMask: "X9;_" validator: RegExpValidator { regExp: /[+-][0-9]/ } } }