Revised validations on advice from krkeegan

 - Create a common validations routine that can be used with any
   definition
 - Minimized the amount of code required per  line validated