improvements to validation in gruntfile