validate data