Allow user to flag only those node that associated to a particular term of a vocabulary? I have content type  "product" term referenced by Taxonomy "Product category" having terms
-Cook tops
-Heaters
-Chimneys

Now if i flagged nodes associated with term "Cook tops" , after that if i flag node associated with "Heater". I should get a error message.

Actually I am using this flag to show flagged item in BASKET(as done in many shopping site). But i do not want to put a "Cook tops" node with "Heater" nodes.
Found these links which solved my question
https://www.drupal.org/node/2235353
https://www.drupal.org/node/952114