add external id validation