> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Method RequireValidStatus

Namespace: [Phoenix.ComponentAPI](https://developer.synopsys.com/docs/modelcenter/component-plug-in-sdk/apidocs/Phoenix.ComponentAPI)\
Assembly: Phoenix.ComponentAPI.dll

## RequireValidStatus(RunStatus, string)

Given a run status, check if it is a valid status for a run result.
If it is valid, return the provided status.
Otherwise, throw an `System.ArgumentOutOfRangeException`.

```csharp theme={null}
public static RunStatus RequireValidStatus(RunStatus candidate, string paramName)

```

### Parameters

`candidate` [RunStatus](https://developer.synopsys.com/docs/modelcenter/component-plug-in-sdk/apidocs/Phoenix.ComponentAPI.RunStatus.md)

The candidate status.

`paramName` [string](https://learn.microsoft.com/dotnet/api/system.string)

The name of the variable containing the status.

### Returns

[RunStatus](https://developer.synopsys.com/docs/modelcenter/component-plug-in-sdk/apidocs/Phoenix.ComponentAPI.RunStatus.md)

The value of `candidate` if the status is valid.
