validateFileNames() {
        const filename_inputs = Array.from(document.querySelectorAll('.filename-input'));
        const filenames = filename_inputs.map(input => input.value);

        // Duplicated filename check
        const duplicated_filenames = this.getDuplicatedFileNames(filenames);
        duplicated_filenames.forEach(filename => {
            this.appendStatusMessage(`Filename: '${filename}' was found to be duplicated.  All filenames must be unique.`);
        });

        // Invalid substrings check
        const illegal_substrings = {
            '..': '..',
            '/': '/',
            ' ': 'spaces',
        };

        const illegal_filenames = this.getFileNamesWithIllegalSubstrings(filenames, Object.keys(illegal_substrings));
        illegal_filenames.forEach(filename => {
            this.appendStatusMessage(`Filename: '${filename}' was found to contain illegal substrings. Filenames may not contain ${Object.values(illegal_substrings).join(' or ')}.`);
        });

        this.colorFailedInputs(duplicated_filenames.concat(illegal_filenames), '.filename-input');

        return duplicated_filenames.length === 0 && illegal_filenames.length === 0;
    }
/**
     * Validates to see if all filename boxes contain unique values.  If validation errors are found then a message
     * is added to the status div and the offending input boxes will have their background color changed to indicate
     * they are the ones that failed validation.
     *
     * @returns {Boolean} True if validation was successful, false otherwise
     */
Validates to see if all filename boxes contain unique values.  If validation errors are found then a message
is added to the status div and the offending input boxes will have their background color changed to indicate
they are the ones that failed validation.

@returns {Boolean} True if validation was successful, false otherwise
Validates to see if all filename boxes contain unique values . If validation errors are found then a message is added to the status div and the offending input boxes will have their background color changed to indicate they are the ones that failed validation . @returns { Boolean } True if validation was successful false otherwise
validateFileNames() {
        const filename_inputs = Array.from(document.querySelectorAll('.filename-input'));
        const filenames = filename_inputs.map(input => input.value);
        const duplicated_filenames = this.getDuplicatedFileNames(filenames);
        duplicated_filenames.forEach(filename => {
            this.appendStatusMessage(`Filename: '${filename}' was found to be duplicated.  All filenames must be unique.`);
        });
        const illegal_substrings = {
            '..': '..',
            '/': '/',
            ' ': 'spaces',
        };
        const illegal_filenames = this.getFileNamesWithIllegalSubstrings(filenames, Object.keys(illegal_substrings));
        illegal_filenames.forEach(filename => {
            this.appendStatusMessage(`Filename: '${filename}' was found to contain illegal substrings. Filenames may not contain ${Object.values(illegal_substrings).join(' or ')}.`);
        });
        this.colorFailedInputs(duplicated_filenames.concat(illegal_filenames), '.filename-input');
        return duplicated_filenames.length === 0 && illegal_filenames.length === 0;
    }
validateFileNames ( ) { const filename_inputs = Array . from ( document . querySelectorAll ( '.filename-input' ) ) ; const filenames = filename_inputs . map ( input => input . value ) ; const duplicated_filenames = this . getDuplicatedFileNames ( filenames ) ; duplicated_filenames . forEach ( filename => { this . appendStatusMessage ( ` ${ filename } ` ) ; } ) ; const illegal_substrings = { '..' : '..' , '/' : '/' , ' ' : 'spaces' , } ; const illegal_filenames = this . getFileNamesWithIllegalSubstrings ( filenames , Object . keys ( illegal_substrings ) ) ; illegal_filenames . forEach ( filename => { this . appendStatusMessage ( ` ${ filename } ${ Object . values ( illegal_substrings ) . join ( ' or ' ) } ` ) ; } ) ; this . colorFailedInputs ( duplicated_filenames . concat ( illegal_filenames ) , '.filename-input' ) ; return duplicated_filenames . length === 0 && illegal_filenames . length === 0 ; }
Validates to see if all filename boxes contain unique values.
Validates to see if all filename boxes contain unique values .
// Duplicated filename check // Invalid substrings check