# [facet 'enumeration'] The value is not an element of the set

Source: https://xmlvalid.com/errors/facet-enumeration

> A value that is not on the schema's list of allowed values.

Example message: `Element 'status': [facet 'enumeration'] The value 'closed' is not an element of the set {'open', 'paid'}.`

## Why it happens

- A code that is not in the code list: a country, currency or unit code, a status.
- A different letter case, or surrounding spaces: the comparison is exact for string types.

## How to fix it

- Use one of the values listed in the message. A follow-up message about the type (*is not a valid value of the local atomic type*) is the same error and disappears with it.

## Example that fails

```xml
<order currency="EUR">
  <id>A-1</id>
  <qty>1</qty>
  <status>closed</status>
</order>
```

## Fixed

```xml
<order currency="EUR">
  <id>A-1</id>
  <qty>1</qty>
  <status>paid</status>
</order>
```
