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

Name validation

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 323 Views 2 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.
  • B Offline
    B Offline
    Buller
    wrote on last edited by
    #1

    I have been looking in vain for a ready made C++ class, or method, that validates peoples names (family and given names separately). I presume regular expressions is the thing to use, but I would rather use an existing (robust) class than attempting to develop my own, as I do not know the first thing about regular expressions. The task is not trivial, as there are names starting with de, van, von, de los, etc., names containing hyphens (such as Jeac-Luc), etc. As name validation must be a very common task I would be surprised if there isn't already an open source Qt/C++ class available. I just have not been able to find anything so far. Any hints about where to look would be most welcome.

    ODБOïO Pablo J. RoginaP 2 Replies Last reply
    0
    • B Buller

      I have been looking in vain for a ready made C++ class, or method, that validates peoples names (family and given names separately). I presume regular expressions is the thing to use, but I would rather use an existing (robust) class than attempting to develop my own, as I do not know the first thing about regular expressions. The task is not trivial, as there are names starting with de, van, von, de los, etc., names containing hyphens (such as Jeac-Luc), etc. As name validation must be a very common task I would be surprised if there isn't already an open source Qt/C++ class available. I just have not been able to find anything so far. Any hints about where to look would be most welcome.

      ODБOïO Offline
      ODБOïO Offline
      ODБOï
      wrote on last edited by
      #2

      hi @Buller

      https://stackoverflow.com/questions/2385701/regular-expression-for-first-and-last-name

      https://doc.qt.io/qt-5/qregularexpressionvalidator.html

      https://www.regextester.com/93648

      1 Reply Last reply
      3
      • B Buller

        I have been looking in vain for a ready made C++ class, or method, that validates peoples names (family and given names separately). I presume regular expressions is the thing to use, but I would rather use an existing (robust) class than attempting to develop my own, as I do not know the first thing about regular expressions. The task is not trivial, as there are names starting with de, van, von, de los, etc., names containing hyphens (such as Jeac-Luc), etc. As name validation must be a very common task I would be surprised if there isn't already an open source Qt/C++ class available. I just have not been able to find anything so far. Any hints about where to look would be most welcome.

        Pablo J. RoginaP Offline
        Pablo J. RoginaP Offline
        Pablo J. Rogina
        wrote on last edited by
        #3

        @Buller you may want to check this answer from @LeLev suggested links

        Upvote the answer(s) that helped you solve the issue
        Use "Topic Tools" button to mark your post as Solved
        Add screenshots via postimage.org
        Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

        1 Reply Last reply
        1

        • Login

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