Validation in ERPnext Rest Api

How can i Vat validation filed in erp ? where i write python code for request from api that validate the vat id .