How to use input query variables in cart and checkout validation function extension?

Please help me take a look,It’s not working when i set the metafields to shopid