Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Validation in QML
Forum Updated to NodeBB v4.3 + New Features

Validation in QML

Scheduled Pinned Locked Moved Solved QML and Qt Quick
3 Posts 2 Posters 1.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    deleted379
    wrote on 12 Sept 2019, 09:09 last edited by deleted379 9 Dec 2019, 10:08
    #1

    Hello,

    There is something not very clear in documentation.

    Say, I am using RegExpValidator for e-mail address form field.

    How to trigger validation of this field upon submission of the form?

    Currently, with the correctly set validator property of the TextField QML type, I am able to leave the field with malformed e-mail address and there is no complaint shown in the user interface.

    What am I missing?

    Thank you in advance.

    1 Reply Last reply
    0
    • I Offline
      I Offline
      IntruderExcluder
      wrote on 12 Sept 2019, 10:24 last edited by
      #2

      When validator is set you can use acceptableInput property of input, to check if it valid.

      D 1 Reply Last reply 12 Sept 2019, 10:29
      3
      • I IntruderExcluder
        12 Sept 2019, 10:24

        When validator is set you can use acceptableInput property of input, to check if it valid.

        D Offline
        D Offline
        deleted379
        wrote on 12 Sept 2019, 10:29 last edited by
        #3

        @intruderexcluder said in Validation in QML:

        When validator is set you can use acceptableInput property of input, to check if it valid.

        Excellent!

        I have now noticed how this relates to accepted() signal and onAccepted handler.

        Thank you for the prompt reply.

        1 Reply Last reply
        0

        1/3

        12 Sept 2019, 09:09

        • Login

        • Login or register to search.
        1 out of 3
        • First post
          1/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved