# hasEnumNamed

Source: https://taxilang.org/docs/language/stdlib/hasEnumNamed

**Full name:** `taxi.stdlib.hasEnumNamed`

## Signature

```taxi
declare extension function <T> hasEnumNamed(enumType: lang.taxi.Type<T>, enumName: String): Boolean
```

## Description

Returns `true` if the enum has an explicitly declared member matching the provided name.

Ignores default entries — an enum with a default value will return `false` for a name that is only matched by the default, not by an explicit declaration.

```taxi
find {
   valid: Boolean = hasEnumNamed(OrderStatus, "PENDING")
}
```

## Examples

Returns true for a declared enum member name, false for a name not in the enum.

Schema:

```taxi
enum OrderStatus { PENDING, APPROVED, REJECTED }
```

Query:

```taxi
find {
   hasPending: Boolean = hasEnumNamed(OrderStatus, "PENDING")
   hasUnknown: Boolean = hasEnumNamed(OrderStatus, "UNKNOWN")
}
```

Result:

```json
{
  "hasPending": true,
  "hasUnknown": false
}
```
