Hi Mohammed
First of all my recommendation is to validate the information in the source system. Why? Because if you reject the data in the target system finally you force the source system to apply validations. A validation in the source system implies a better perfomance in the network dataflows.
Although you can validate the data in a mapping with a UDF, this wouldn't be my recommendation.
You can enhance data structure definition with validations like the previous post and actívate in the integration builder elements (adapter or integration engine), Then i would define an alert in PI for this interface.
All depends on the way you need to keep informed the users about the errors or in the kind of validations. Validate uppercase letters it's very simple but for example you would be to used the target system to validate certain values for a field.
Kr