If you use staging in your EDI process, the received messages are stored in a staging journal. On insert of the message into the staging journal, the applicable journal validations are done.
To define these validations, you set up:
Validation rules
Journal validations