Improved input validation of invalid folder name filter