public function validate(File $file, $typeName, $sourceFilePath = null)
	{
		$name = $file->getFileName();
		$fileNameHelper = new Helpers\FileNameValidationHelper();
		$result = $fileNameHelper->validate($name);
		
		if( ! $result) {
			$message = $fileNameHelper->getErrorMessage();
			
			throw new Exception\UploadFilterException(self::EXCEPTION_MESSAGE_KEY, $message);
		}
	}
public function validate(File $file, $typeName, $sourceFilePath = null)
	{
		$name = $file->getFileName();
		$fileNameHelper = new Helpers\FileNameValidationHelper();
		$result = $fileNameHelper->validate($name);
		
		if( ! $result) {
			$message = $fileNameHelper->getErrorMessage();
			
			throw new Exception\UploadFilterException(self::EXCEPTION_MESSAGE_KEY, $message);
		}
	}
public function validate ( File $ file , $ typeName , $ sourceFilePath = null ) { $ name = $ file -> getFileName ( ) ; $ fileNameHelper = new Helpers \ FileNameValidationHelper ( ) ; $ result = $ fileNameHelper -> validate ( $ name ) ; if ( ! $ result ) { $ message = $ fileNameHelper -> getErrorMessage ( ) ; throw new Exception \ UploadFilterException ( self :: EXCEPTION_MESSAGE_KEY , $ message ) ; } }
Validates filename for files and folders
@param File $file
@param string $typeName
Validates filename for files and folders