diff --git a/ui/StatusQ/src/StatusQ/Controls/StatusBaseInput.qml b/ui/StatusQ/src/StatusQ/Controls/StatusBaseInput.qml index cdd2e7654a..246b1a109d 100644 --- a/ui/StatusQ/src/StatusQ/Controls/StatusBaseInput.qml +++ b/ui/StatusQ/src/StatusQ/Controls/StatusBaseInput.qml @@ -182,9 +182,9 @@ Item { /*! \qmlproperty bool StatusBaseInput::valid - This property sets the valid state. Default value is true. + This property sets the valid state. Default value is false. */ - property bool valid: true + property bool valid: false /*! \qmlproperty bool StatusBaseInput::pristine This property sets the pristine. Default value is true. diff --git a/ui/StatusQ/src/StatusQ/Controls/StatusInput.qml b/ui/StatusQ/src/StatusQ/Controls/StatusInput.qml index c763d26bd3..a6fa4d5f40 100644 --- a/ui/StatusQ/src/StatusQ/Controls/StatusInput.qml +++ b/ui/StatusQ/src/StatusQ/Controls/StatusInput.qml @@ -48,6 +48,7 @@ Item { This property holds a reference to the TextEdit's valid property. */ property alias valid: statusBaseInput.valid + /*! \qmlproperty alias StatusInput::pending This property holds a reference to the TextEdit's pending property. @@ -243,7 +244,7 @@ Item { This function resets the text input validation and text. */ function reset() { - statusBaseInput.valid = true + statusBaseInput.valid = false statusBaseInput.pristine = true statusBaseInput.text = "" root.errorMessage = "" @@ -276,8 +277,12 @@ Item { valid: result } } - result.errorMessage = validator.errorMessage errors[validator.name] = result + + // the only way to trigger bindings for var property + errors = errors + result.errorMessage = validator.errorMessage + statusBaseInput.valid = statusBaseInput.valid && false } }