XL.Sheet.DataValidation
-----------------------

Queries details on one data validation.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [XL](component_XL.md) | [16.3](newinversion163.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "XL.Sheet.DataValidation"; BookRef; SheetIndex; Index ) 

**MBS**( **"XL.Sheet.DataValidation";** /\* Queries details on one data validation. \*/  
**$BookRef**; /\* The reference number for the workbook.e.g. $ref \*/   
**$SheetIndex**; /\* The index of the sheet. This number ranges from 0 to [XL.Book.SheetCount](XLBookSheetCount.md)-1.e.g. 0 \*/   
**$Index**) /\* The index for the data validations.  
Range from 0 to [XL.Sheet.DataValidationSize](XLSheetDataValidationSize.md)-1. \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| BookRef | The reference number for the workbook. | $ref |
| SheetIndex | The index of the sheet. This number ranges from 0 to [XL.Book.SheetCount](XLBookSheetCount.md)-1. | 0 |
| Index | The index for the data validations.   Range from 0 to [XL.Sheet.DataValidationSize](XLSheetDataValidationSize.md)-1. | $index |

### Result

Returns JSON or error.

### Description

Queries details on one data validation.  
Returns a JSON with the details.  
  
| Name | Description |
|---|---|
| index | the index of data validation; |
| type | the type of data validation; |
| op | the relational operator of data validation; |
| rowFirst | the first row of range; |
| rowLast | the last row of range; |
| colFirst | the first column of range; |
| colLast | the last column of range; |
| value1 | the first value for relational operator; |
| value2 | the second value for VALIDATION\_OP\_BETWEEN = 0 or VALIDATION\_OP\_NOTBETWEEN = 1 operator; |
| allowBlank | a boolean value indicating whether the data validation treats empty or blank entries as valid, 'true' means empty entries are OK and do not violate the validation constraints; |
| hideDropDown | a boolean value indicating whether to display the dropdown combo box for a list type data validation (VALIDATION\_TYPE\_LIST = 3); |
| showInputMessage | a boolean value indicating whether to display the input prompt message; |
| showErrorMessage | a boolean value indicating whether to display the error alert message when an invalid value has been entered, according to the criteria specified; |
| promptTitle | title bar text of input prompt; |
| prompt | message text of input prompt; |
| errorTitle | title bar text of error alert; |
| error | message text of error alert; |
| errorStyle | the style of error alert used for this data validation. |

### See also

- [XL.Book.SheetCount](XLBookSheetCount.md)
- [XL.Sheet.AddDataValidation](XLSheetAddDataValidation.md)
- [XL.Sheet.DataValidations](XLSheetDataValidations.md)
- [XL.Sheet.DataValidationSize](XLSheetDataValidationSize.md)

### Release notes

- **Version 16.3**
    - Added XL.Sheet.DataValidation, XL.Sheet.DataValidationSize and XL.Sheet.DataValidations functions.

### Blog Entries

- [LibXL 5.2 released](https://www.mbsplugins.de/archive/2026-06-13/LibXL_52_released/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 16.3pr1](https://www.mbsplugins.de/archive/2026-06-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 21st May 2026 , last changed 21st May 2026

  
[XL.Sheet.CopyCell](XLSheetCopyCell.md) - [XL.Sheet.DataValidationSize](XLSheetDataValidationSize.md)

[HTML Version](XLSheetDataValidation.shtml)