One file database rules validator written in PHP and using rules in JSON