add validation to models