Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
It will not pass this value to backend. How to forbid input "0" with a popup hint string? Thanks~
Have tried with accepted() signal ? This will emit only if the input is valid. You can show pop-up inside the accepted signal handler.
Thank you! When input is invalid, it keeps silent. So I finally do a trick by forcing no "0" from the begin (The input needs to be integers start from 1). onTextChanged: { if(text.substring(0, 1) == "0") text = "1" }
hi,
TextField{ validator: RegExpValidator { regExp: /^[1-9][0-9]*$/ } }