# Validation

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Reference](https://developer.m-files.com/APIs/gRPC-API/Reference/index.md) > [Messages](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.Validation/

The definition of an validation struct.

- **Full name:** `MFiles.Validation`
- **Proto file:** [`mfiles/structs.proto`](https://developer.m-files.com/APIs/gRPC-API/downloads/proto/mfiles/structs.proto)

<a id="fields"></a>

## Fields

| Field | Type | Number | Description |
|---|---|---|---|
| <a id="f-regular_expression"></a>`regular_expression` | `string` | 1 | A regular expression for the validation. |
| <a id="f-code"></a>`code` | `string` | 2 | VBScript used in the validation. |

<a id="used-in-fields"></a>

## Used in fields

- [`PropertyDefAdmin.validation`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.PropertyDefAdmin/index.md#f-validation): The definitions for property value validation.
