I applaud your efforts here. Cybersecurity is one of the most misunderstood fields by the broader public. I have never found a way to make it sexy though, lol.
My best efforts so far have resulted in a "draw a password" system.
As far as your validation efforts go, look at "regex". Regex is one of the most demonically useful tools out there.
Although, I can't see to find a good online tool for testing regex in C++.
try: https://www.myregextester.com/