Convert a Sails.js Model definition into a congruence.js validator function