'Validates a schedule.'

def Validate(self, value, key=None):

    if (value is None):
        raise validation.MissingAttribute('schedule    must    be    specified')
    if (not isinstance(value, basestring)):
        raise TypeError(("schedule    must    be    a    string,    not    '%r'" % type(value)))
    try:
        groctimespecification.GrocTimeSpecification(value)
    except groc.GrocException as e:
        raise validation.ValidationError(("schedule    '%s'    failed    to    parse:    %s" % (value, e.args[0])))
    return value
