# Is not a valid value of the atomic type

Source: https://xmlvalid.com/errors/not-a-valid-value-of-the-atomic-type

> A value does not match its data type: a number, a date, a boolean…

Example message: `Element 'qty': 'two' is not a valid value of the atomic type 'xs:int'.`

## Why it happens

- Text where a number is expected, or a decimal comma: `4,820.00` is not an `xs:decimal`, `4820.00` is.
- Dates in a local format: `xs:date` is `2026-10-15`, not `15/10/2026`; `xs:dateTime` needs a `T` between date and time.
- Booleans other than `true`, `false`, `1` and `0`; empty elements where a number is required.
- A value out of range for the type: `xs:int` stops at 2147483647.

## How to fix it

- Write the value in the type's canonical form. An empty value is valid only if the type allows it; otherwise leave the element out (when it is optional) or use `xsi:nil` where the schema declares it nillable.

## Example that fails

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

## Fixed

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