# Language Basics

The CsvPath's Validation Language is simple, declarative, and purpose-built. Here is a quick introduction. As well as in these pages, there is [more information and more examples on Github](https://github.com/dk107dk/csvpath/tree/main).

* [Root, Scanning, and Matching](#root-scanning-and-matching)
* [File References and Match Components](#file-references-and-match-components)
* [Scanning Expressions and Variables](#scanning-expressions-and-variables)
* [Comments and Linebreaks](#comments-and-linebreaks)
* [When/Do Expressions and References](#when-do-expressions-and-references)
* [Multiple Validation Rules](#multiple-validation-rules)
* [A Complex Validation Rule](#a-complex-validation-rule)

## Root, Scanning, and Matching

<figure><img src="/files/r7rCxcIj6FdKgWZRINvu" alt="" width="563"><figcaption></figcaption></figure>

## File References and Match Components

<figure><img src="/files/QwfpvmLbKm5G7oihB7L7" alt="" width="563"><figcaption></figcaption></figure>

## Scanning Expressions and Variables

<figure><img src="/files/s2BD6CtbdjvjzYi86pQX" alt="" width="563"><figcaption></figcaption></figure>

## Comments and Linebreaks

<figure><img src="/files/Dsa9GYbhkOofveo1Odeb" alt="" width="563"><figcaption></figcaption></figure>

## When/Do Expressions and References

<figure><img src="/files/f9jfIeiFp5iHk8dqOo3E" alt="" width="563"><figcaption></figcaption></figure>

## Multiple Validation Rules

<figure><img src="/files/U2dAGBbnP3tBdii4U8Xx" alt=""><figcaption></figcaption></figure>

## A Complex Validation Rule

<figure><img src="/files/UhtX3KQmBGiXCS835c8n" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.csvpath.org/topics/practical-stuff/language.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
