<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def validate(schema, value, noun='value'):
 """ Checks the value against the schema, and raises ValidationError if validation fails. """

    errors = schema.errors(value)
    if errors:
        error_details = ''
        for error in errors:
            if error.pointer:
                error_details += '  - %s: %s\n' % (error.pointer, error.message)
            else:
                error_details += '  - %s\n' % error.message
        raise ValidationError('Invalid %s:\n%s' % (noun, error_details))