def validate(self, value=None, model=None, context=None):
        """
        Sequentially apply each validator to value and collect errors.

        :param value: a value to validate
        :param model: parent entity
        :param context: validation context, usually parent entity
        :return: list of errors (if any)
        """
        errors = []
        for validator in self.validators:
            if value is None and not isinstance(validator, Required):
                continue

            error = validator.run(
                value=value,
                model=model,
                context=context if self.use_context else None
            )
            if error:
                errors.append(error)

        return errors
def validate ( self , value = None , model = None , context = None ) : errors = [ ] for validator in self . validators : if value is None and not isinstance ( validator , Required ) : continue error = validator . run ( value = value , model = model , context = context if self . use_context else None ) if error : errors . append ( error ) return errors
Sequentially apply each validator to value and collect errors.

        :param value: a value to validate
        :param model: parent entity
        :param context: validation context, usually parent entity
        :return: list of errors (if any)