Hi Pooja,
IDoc is a different ball game. for data validation, you will need to populate the data (mapping) in the IDoc fields in PI. Then ABAP developer needs to look for a user exit (enhancement) in inbound process code where they will code for data validation (like in a proxy). If validated, the IDoc will be posted fine else it will fail and subsequent steps to reprocess data from source or in SAP can be taken.
Hope it helps!
Ambrish