how to validate customized form header field towarehouse

While selecting the To warehouse on the header, the system must validate whether the user creating the requisition is linked to the To warehouse or not. If not, then the user must not be allowed to continue. The same user id can be assigned to multiple warehouses.plz urgent.