'Adds the provided error to c.errors and flags that it is come
from the validator\'s param'

def set_error(self, error, msg_params={}, field=False, code=None):

    if (field is False):
        field = self.param
    c.errors.add(error, msg_params=msg_params, field=field, code=code)
    self.has_errors = True
