PR check to validate of file_name is validate or not

PR check to validate of file_name is validate or not .
I want to write script to validate the file name on other directory is validate or not . I need to put this on every PR.