Why YAML breaks
YAML is designed to be readable, and it buys that readability by making whitespace structural. That is the source of nearly every error: a line indented by three spaces where its siblings use two, or a tab character that looks identical to spaces on screen but is rejected outright.
The type-coercion surprises
The second category is subtler because the file parses fine and the data is simply wrong. A value like 1.20 becomes the number 1.2, losing the trailing zero, in any YAML parser. Parsers that follow the older YAML 1.1 — Python's PyYAML among them — go further: a set of bare words become booleans, so the country code NO becomes false and a version key of on becomes true, and times such as 22:30 can be read as base-60 numbers.
This validator follows YAML 1.2 for those words and times, which stay strings — so a file that looks right here can still change type in a YAML 1.1 reader. The fix is the same either way: quote anything meant to be a string. The JSON preview shows what this parser produced — dates appear as ISO timestamps, and .inf or .nan as null, because JSON has no such values — which is where a lost trailing zero or a mis-nested list shows up.
Where YAML shows up
Kubernetes manifests, Docker Compose files, GitHub Actions workflows, OpenAPI specifications and Ansible playbooks. In most of these a subtle parse difference means a deployment behaves unexpectedly rather than failing loudly, which is what makes checking the parsed output worthwhile.
For the equivalent JSON checks, use the JSON validator and formatter.