# Validate

> Checks whether the detail prototype is valid and the Terrain can accept it.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/7000.0/script-reference/unityengine.md)
* **Assembly:** UnityEngine.TerrainModule

## Validate()

Checks whether the detail prototype is valid and the Terrain can accept it.

```csharp
public bool Validate()
```

### Returns

| Type                                                          | Description                                                                            |
| ------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the detail prototype is valid and the Terrain can accept it. Otherwise, false. |

## Validate(string)

Checks whether the detail prototype is valid and the Terrain can accept it.

```csharp
public bool Validate(out string errorMessage)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Returns a message that indicates the cause of failed validation.

### Returns

| Type                                                          | Description                                                                            |
| ------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the detail prototype is valid and the Terrain can accept it. Otherwise, false. |
