Every so often I look at the code for Labyrinth and realise it might be of use to others. As such my use of constraints with Data::FormValidator seemed to be another likely candidate.
I have a wrapper that builds the rules for parsing user input, using a configuration file, which makes defining the rules fairly straight forward. It's much easier to name a common constraint for user input than a regex, as it's too easy to make a mistake with regexes. The constraints are all word patterns that restrict the user input to varying degrees. Although I have written the current code with Latin-1 in mind, the code can be subclassed to validate against other character sets.
The code should be on CPAN soon as Data::FormValidator::Constraints::Words.