def validate_metadata_prefix(value, **kwargs):
    """Check metadataPrefix.

    :param value: One of the metadata identifiers configured in
        ``OAISERVER_METADATA_FORMATS``.
    """
    metadataFormats = current_app.config['OAISERVER_METADATA_FORMATS']
    if value not in metadataFormats:
        raise ValidationError('metadataPrefix does not exist',
                              field_names=['metadataPrefix'])