validate grid