validations and error messaging system