---
id: "P:cAlgo.API.SaveFileDialog.ValidateNames"
kind: "property"
type: "T:cAlgo.API.SaveFileDialog"
url: "https://help.ctrader.com/ctrader-algo/references/Dialogs/SaveFileDialog/ValidateNames/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# SaveFileDialog.ValidateNames

Member of [SaveFileDialog](https://help.ctrader.com/ctrader-algo/references/Dialogs/SaveFileDialog/index.md).

## ValidateNames

Gets or sets a value indicating whether the dialog accepts only valid file names.

Environments: Desktop supported · CLI not supported · Cloud not supported.

- CLI: No dialog can be shown in the CLI: ShowDialog returns FileDialogResult.None, nothing is written and the dialog settings are only stored.
- Cloud: No dialog can be shown in the cloud: ShowDialog returns FileDialogResult.None, nothing is written and the dialog settings are only stored.

C#:

```csharp
public bool ValidateNames {get; set;}
```

Python:

```python
saveFileDialog.ValidateNames: bool
```

### Returns

`bool` — 

Available since cAlgo.API 5.1.

### Examples

C#:

```csharp
var saveFileDialog = new SaveFileDialog { ValidateNames = true };
saveFileDialog.ShowDialog();
```

Python:

```python
saveFileDialog = SaveFileDialog()
saveFileDialog.ValidateNames = True
saveFileDialog.ShowDialog()
```

