The carot indicates start of string, the dollar the end of string. So it must match on the entire string, not a piece of it.
Contributes to issue CURA-2692.
There is also a more advanced attempt that allows more, but I've commented it out because it doesn't quite work yet. Special characters now always count for 12.
Contributes to issue CURA-2652.
Currently this validator can't be used in QML due to a PyQt bug. I plan to call the validator manually upon receiving a signal that the text changed in a text box.
Contributes to issue CURA-2692.