The Validation module enables you to verify that the contents of a message in a Mule flow matches a specific criteria. The Validation module provides explicit messages about what causes an exception to occur in a Mule flow. Based on the specific data you are validating, you can further customize the exception message that is displayed in the logs.
If the message being validated does not meet the defined criteria, the validation fails and returns a ValidationException. By default, this message includes a meaningful message. You can customize this message and change the type of exception that is thrown. In this case, the exception type must have a constructor that overrides Exception(String).
To throw an exception that does not contain Exception(String) or that is more complicated, create a custom validation component.
Note: This module only works with Mule 4 and Studio 7.