Add support of multiple rules

Now we have only one rule (last rule) to one field. This PR makes it possible to have multiple rules.