**Source URL:** https://general.veevavault.dev/mdl/documentation/references/attribute-data-types.md

# Attribute Data Types

Vault components and subcomponents use attribute values for their configuration.

MDL attributes use the following data types:

| Data Type | Description | Validation | Example |
| --- | --- | --- | --- |
| **String** | Can contain letters, numbers, and spaces. | Must be wrapped in single quotes (`'`). Maximum number of characters allowed is defined as max_length on the attribute metadata | `attribute('This is a String')` |
| **Boolean** | Can have two values: true and false |  | `attribute(true)` |
| **Number** | Contains digits. | Maximum value defined as `max_value` on the attribute metadata. Minimum value defined as `min_value` on the attribute metadata. Max number of decimal places defined as `scale` on the attribute metadata | `attribute(1234)` |
| **Component** | A reference to a component in the Vault. | Component type is defined as `component` on the attribute metadata | `attribute('Doctype.my_special_doctype__c')` |
| **Enum** | A value from a list of predefined values sorted in the order you entered them. | Allowed values list defined as `enums` on the attribute metadata | `attribute('Red')` |
| **XMLString** | Complex data in XML format | The specified values bust be wrapped in curly brackets (`{}`). The framework validates XML structure only (not the content). Vault returns the GEN-F***-II-1056 error code if invalid. Maximum number of characters allowed is defined as `max_length` on the attribute metadata | `attribute({Some XML})` |
| **LongString** | A Long Text field | Maximum number of characters allowed is defined as `max_length` on the attribute metadata | `attribute('...')` |
| **SdkCode** | Some Java SDK source code. | Must be wrapped in a  node. | `attribute(...)` |
| **Expression** | A formula. | Maximum number of characters allowed is defined as `max_length` on the attribute metadata | `attribute([field__c='abc'])` |
| **File** | A reference to a binary configuration file. |  | `attribute('bc17a630e6493266d5f629460c91748c')` |


---

**Previous:** [References](/mdl/documentation/references)  
**Next:** [Errors](/mdl/documentation/references/errors)