Validate files based on their extension.

The FileExtensionValidator extension can be configured with the FileExtensionValidatorOptions object.

When using defineFilePond the value of the accept attribute on the <input type="file"> is automatically passed to this extension.

import { defineFilePond } from 'filepond';
import { locale } from 'filepond/locales/en-gb.js';
import { FileExtensionValidator } from 'filepond/extensions/file-extension-validator.js';

defineFilePond({
    locale,
    extensions: [
        // Add the FileExtensionValidator extension and configure with FileExtensionValidatorOptions object
        [FileExtensionValidator, {
            accept: ['.jpg', '.png'],
        }]
    ]
})