1// Copyright (C) 2017 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
5\page qtquick-input-textinput.html
6\title Qt Quick Text Input Handling and Validators
7\brief Text input and validation
9\section1 Text Visual Types
11Qt Quick provides several types to display text onto the screen. The \l Text
12type will display formatted text onto the screen, the \l TextEdit type
13will place a multiline line edit onto the screen, and the \l TextInput will
14place a single editable line field onto the screen.
16To learn more about their specific features and properties, visit their
17respective documentation.
19\section1 Validating Input Text
21The \e validator types enforce the type and format of
24\annotatedlist qtquick-text-validators
26\snippet qml/texthandling.qml int validator
27The validator types bind to \c {TextInput}'s \c validator property.
29\snippet qml/texthandling.qml regexp validator
30The regular expression in the snippet will only allow the inputted text to be
33Note that QML parses JavaScript regular expressions, while Qt's
34\l {QRegularExpression} class' regular expressions are based on Perl regular expressions.