[Book][Validation] fix code block syntax

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | 2.2
| Fixed tickets | 

The examples should render properly even if ``2.2`` isn't maintained anymore.