attachment validation