'Create a template with the added optional `pattern` argument,
a regular expression string that the value should match.'

def __init__(self, default=REQUIRED, pattern=None):

    super(String, self).__init__(default)
    self.pattern = pattern
    if pattern:
        self.regex = re.compile(pattern)
