Try a validation library along the lines of cl-print. I'm sure I will regret the name.
GNU General Public License v3.0GPL-3.0