diagram validation