Friends, I would like your opinion and suggestions regarding parameters validation rules established on a website. I have 2 types of parameters, one global, that would serve for the whole site, and one called product, which would serve for products. They are n validations that I have to do, first I have to validate for the global, type, the client can only buy 3 products in general until their delivery and other parameters. After verifying this for the parameters of the products, type the user can only take 3 unit of a certain product. There are many rules that will have to be compared in order to validate the data. I would like ideas, suggestions to make these validations efficiently. I have a table called parameters, where except the general parameters, and each product, saved in the same products table I look forward to everyone's help.