You can e.g. change your method to
public static List<String> isValidFile(File file)
When the file is valid return an empty list or null
,
otherwise return a list with the validation problems. The
return value is your indication if validation failed or not.