diff options
author | Liang Qi <liang.qi@qt.io> | 2017-06-15 08:57:58 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-06-15 09:10:12 +0200 |
commit | 9f3aefb086c5f9d6b9dd192689bdd473da07186a (patch) | |
tree | 93349812f4a46305edf5e27f7e737d952e0d9a3a /src/quick/util | |
parent | a021bd87755ccfbe49e132f942ded935c9719b00 (diff) | |
parent | d2bb2e202427ebae545a408f065c893f3d837061 (diff) |
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
src/qml/compiler/qv4codegen.cpp
Change-Id: I3c41b9fc9ba7d41741e4dd400402ae80dd7726d9
Diffstat (limited to 'src/quick/util')
-rw-r--r-- | src/quick/util/qquickvalidator.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/quick/util/qquickvalidator.cpp b/src/quick/util/qquickvalidator.cpp index a05117bd06..93f414fe80 100644 --- a/src/quick/util/qquickvalidator.cpp +++ b/src/quick/util/qquickvalidator.cpp @@ -219,6 +219,19 @@ void QQuickDoubleValidator::resetLocaleName() matching "a". By default, this property contains a regular expression with the pattern .* that matches any string. + + Below you can find an example of a \l TextInput object with a RegExpValidator specified: + + \snippet qml/regexp.qml 0 + + Some more examples of regular expressions: + + \list + \li A list of numbers with one to three positions separated by a comma: + /\d{1,3}(?:,\d{1,3})+$/ + \li An amount consisting of up to 3 numbers before the decimal point, and + 1 to 2 after the decimal point: \li /(\d{1,3})([.,]\d{1,2})?$/ + \endlist */ #endif // validator |