Validate data before submitting to a database
