validate text