<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def required_validator(validator, req, instance, schema):
 """Swagger 1.2 expects `required` to be a bool in the Parameter object, but a list of properties in a Model object. """

    if schema.get('paramType'):
        if req is True and not instance:
            return [ValidationError("%s is required" % schema['name'])]
        return []
    return _validators.required_draft4(validator, req, instance, schema)