add validation to image