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
QtWS25 Last Chance

Validation in QML

Scheduled Pinned Locked Moved Solved QML and Qt Quick
3 Posts 2 Posters 1.2k Views
  • 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 last edited by deleted379
    #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
    • IntruderExcluderI Offline
      IntruderExcluderI Offline
      IntruderExcluder
      wrote on 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
      3
      • IntruderExcluderI IntruderExcluder

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

        D Offline
        D Offline
        deleted379
        wrote on 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

        • Login

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