# Query Validation

Graphene-Django supports query validation by allowing passing a list of validation rules (subclasses of ValidationRule from graphql-core) to the `validation_rules` option in `GraphQLView`.

    from django.urls import path
    from graphene.validation import DisableIntrospection
    from graphene_django.views import GraphQLView

    urlpatterns = [
        path("graphql", GraphQLView.as_view(validation_rules=(DisableIntrospection,))),
    ]

or

    from django.urls import path
    from graphene.validation import DisableIntrospection
    from graphene_django.views import GraphQLView

    class View(GraphQLView):
        validation_rules = (DisableIntrospection,)

    urlpatterns = [
        path("graphql", View.as_view()),
    ]