graph validation