# Validation assertions and error handling

*MuleSoft Developer II Study Guide · Implement performant and reliable Mule applications · Last updated November 7, 2026 · https://www.certifyforce.com/study-guide/mulesoft-developer-ii/implement-performant-and-reliable-mule-applications/validation-assertions-and-error-handling*

Configure assertion criteria, parsing and localized messages, aggregate actual validation-family errors, and distinguish format, time-window and typed-value requirements.

- Certification: Salesforce MuleSoft Developer II
- Exam section: Implement performant and reliable Mule applications
- Study guide: https://www.certifyforce.com/study-guide/mulesoft-developer-ii

**Official exam objective:**

> Validate assertions using the Validation module.

## What the exam expects

- Group assertions and handle validation errors by their actual hierarchy.
- Configure input parsing independently of error-message localization.
- Distinguish syntax, reachability, address components and business time windows.
- Select null, blank and size assertions for the value actually supplied.

An **assertion** rejects data that violates a criterion; **All** groups validation results; an **error hierarchy** defines parent matching; **locale** can govern parsing or message language; **Since** starts an elapsed-time interval. This lesson uses Mule 4.6 with Validation 2.0.6, and JSON 2.4.2 where the error ancestry matters ([Validation reference](https://docs.mulesoft.com/validation-connector/latest/validation-documentation), [Validation source](https://repository.mulesoft.org/nexus/content/repositories/releases/org/mule/modules/mule-validation-module/2.0.6/mule-validation-module-2.0.6-sources.jar), [JSON source](https://repository.mulesoft.org/nexus/content/repositories/releases/org/mule/modules/mule-json-module/2.4.2/mule-json-module-2.4.2-sources.jar)).

## Key facts

| Fact | Detail | Source |
|---|---|---|
| All execution | Nested checks run sequentially on the flow thread. | [All](https://docs.mulesoft.com/validation-connector/latest/validation-examples) |
| Aggregate descriptions | Customize each inner operation's Message. | [Messages](https://docs.mulesoft.com/validation-connector/latest/validation-examples) |
| Eligible errors | All checks the `MULE:VALIDATION` parent hierarchy. | [Implementation](https://repository.mulesoft.org/nexus/content/repositories/releases/org/mule/modules/mule-validation-module/2.0.6/mule-validation-module-2.0.6-sources.jar) |
| JSON schema ancestry | JSON 2.4.2 schema-not-honoured descends from validation. | [JSON source](https://repository.mulesoft.org/nexus/content/repositories/releases/org/mule/modules/mule-json-module/2.4.2/mule-json-module-2.4.2-sources.jar) |
| Number parsing | Configure Number Type, Locale and Pattern. | [Reference](https://docs.mulesoft.com/validation-connector/latest/validation-documentation) |
| Time parsing | `HH:mm` describes a 24-hour hour/minute value. | [Java 17](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/time/format/DateTimeFormatter.html), [Module source](https://repository.mulesoft.org/nexus/content/repositories/releases/org/mule/modules/mule-validation-module/2.0.6/mule-validation-module-2.0.6-sources.jar) |
| URL check | Syntax acceptance does not prove remote reachability. | [URL](https://docs.mulesoft.com/validation-connector/latest/validation-examples) |
| IP check | Validate the address without a port suffix. | [IP](https://docs.mulesoft.com/validation-connector/latest/validation-examples) |
| I18n sharing | Operations reference the configured bundle and locale. | [I18n](https://docs.mulesoft.com/validation-connector/latest/validation-documentation) |
| Time-window origin | Since is the initial DateTime, not the interval size. | [Elapsed](https://docs.mulesoft.com/validation-connector/latest/validation-documentation) |

## Check yourself

- Why can identical `null` text in a log hide different validation inputs?
- When a custom validation message replaces the standard wording, does that alone rename the error type?
- Why should a downstream operation not assume Is Number converted a numeric String into a Number?

## Sources

- [Validation Module Reference](https://docs.mulesoft.com/validation-connector/latest/validation-documentation)
- [Validation Module Examples 2.0](https://docs.mulesoft.com/validation-connector/latest/validation-examples)
- [Validation Module 2.0.6 Primary Sources](https://repository.mulesoft.org/nexus/content/repositories/releases/org/mule/modules/mule-validation-module/2.0.6/mule-validation-module-2.0.6-sources.jar)
- [JSON Module 2.4.2 Primary Sources](https://repository.mulesoft.org/nexus/content/repositories/releases/org/mule/modules/mule-json-module/2.4.2/mule-json-module-2.4.2-sources.jar)
- [Java 17 DateTimeFormatter](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/time/format/DateTimeFormatter.html)

## About the full unit

The "Core concepts", "Exam traps" and "Worked scenario" sections of this unit, its 10 linked practice questions, and unlimited timed mock exams are included with the MuleSoft Developer II pack (USD $19): https://www.certifyforce.com/practice-exams
