docs: def validate_version(err, value, source):
      'Tests a manifest version number'
  
  
      field_name = '<em:version>' if source == 'install.rdf' else 'version'
  
      err.metadata['version'] = value
  
      # May not be longer than 32 characters
      if len(value) > 32:
          err.error(
              ('metadata_helpers', '_test_version', 'too_long'),
              'The value of {name} is too long'.format(name=field_name),
              'Values supplied for {name} in the {source} file must be 32 '
              'characters or less.'.format(name=field_name, source=source),
              source)
  
      # Must be a valid version number.
      if not VERSION_PATTERN.match(value):
          err.error(
              ('metadata_helpers', '_test_version', 'invalid_format'),
              'The value of {name} is invalid'.format(name=field_name),
              'The values supplied for version in the {source} file is not a '
              'valid version string. It can only contain letters, numbers, and '
              'the symbols +*.-_.'.format(name=field_name, source=source),
              source)