aws_lambda_decorators/classes.py
def validate(self, value, group_errors):
        """
        Validates a value against the passed in validators

        Args:
            value (any): value to be validated
            group_errors (bool): flag that indicates if error messages are to be grouped together
                (if set to False, validation will end on first error)

        Returns:
            A list of errors
        """
        errors = []

        if self._validators:
            for validator in self._validators:
                if not validator.validate(value):
                    if hasattr(validator, "_error_message"):
                        errors.append(validator.message(value))
                    else:  # calling the validator statically
                        errors.append(validator.ERROR_MESSAGE.format(value=value))
                    if not group_errors:
                        return errors

        return errors

        Validates a value against the passed in validators

        Args:
            value (any): value to be validated
            group_errors (bool): flag that indicates if error messages are to be grouped together
                (if set to False, validation will end on first error)

        Returns:
            A list of errors
        
Validates a value against the passed in validators
Validates a value against the passed in validators
def validate(self, value, group_errors):
        errors = []
        if self._validators:
            for validator in self._validators:
                if not validator.validate(value):
                    if hasattr(validator, "_error_message"):
                        errors.append(validator.message(value))
                    else:  
                        errors.append(validator.ERROR_MESSAGE.format(value=value))
                    if not group_errors:
                        return errors
        return errors
def validate ( self , value , group_errors ) : errors = [ ] if self . _validators : for validator in self . _validators : if not validator . validate ( value ) : if hasattr ( validator , "_error_message" ) : errors . append ( validator . message ( value ) ) else : errors . append ( validator . ERROR_MESSAGE . format ( value = value ) ) if not group_errors : return errors return errors
Validates a value against the passed in validators
Validates a value against the passed in validators
"""
        Validates a value against the passed in validators

        Args:
            value (any): value to be validated
            group_errors (bool): flag that indicates if error messages are to be grouped together
                (if set to False, validation will end on first error)

        Returns:
            A list of errors
        """ # calling the validator statically
A list of errors
A list of errors
self
value
value to be validated
value to be validated
group_errors
flag that indicates if error messages are to be grouped together
(if set to False, validation will end on first error)
flag that indicates if error messages are to be grouped together ( if set to False validation will end on first error )