# MinEntriesAttribute

Kind: Class · Namespace: Sansar.Script · Assembly: Sansar.Script.dll · Script API 47.10.0

<div class="api-meta">
<span class="api-kind api-kind-class" data-pagefind-filter="kind:Class">Class</span>
<span data-pagefind-filter="namespace:Sansar.Script">Namespace <a href="/scripting/api/sansar.script"><code>Sansar.Script</code></a></span>
<span>Inherits <a href="https://learn.microsoft.com/dotnet/api/system.attribute">Attribute</a></span>
</div>

<span id="T:Sansar.Script.MinEntriesAttribute"></span>

Set the Minimum number of array values allowed.

```csharp
[System.AttributeUsage(System.AttributeTargets.Field)]
public class MinEntriesAttribute : Attribute
```

## Remarks

Defaults to 0, allowing the array to be empty.

## Members at a glance

| Kind | Members |
|---|---|
| **Constructors** | [MinEntriesAttribute](#minentriesattribute) |

## Constructors

### MinEntriesAttribute

<div class="api-card">
<span id="M:Sansar.Script.MinEntriesAttribute.#ctor(System.Int32)"></span>
<span id="C:Sansar.Script.MinEntriesAttribute(System.Int32)"></span>

```csharp signature
public MinEntriesAttribute(int minCount)
```

Set the Minimum number of array values allowed.

| Parameter | Type | Description |
|---|---|---|
| `minCount` | [int](https://learn.microsoft.com/dotnet/api/system.int32) |  |

<details class="api-remarks"><summary>Remarks</summary>

Defaults to 0, allowing the array to be empty.

</details>

<details class="api-example" open><summary>Example</summary>

```csharp
[MinValues(1)]
public IList<float>floatList;
```

</details>

</div>




<p class="api-generated" data-pagefind-ignore>Generated from the Sansar 47.10.0 client ScriptApi snapshot.</p>