Validation script does not work for Arrays

I am having two parameters for my component, I would like Parameter1 is a String Array, Parameter2 is a String. I would like to create a validation script which checks that at least one of these two parameters is not empty. For some reason anything I try, does not work for Arrays. Even if I simply check for Parameter1 is not empty and I make it empty, it does not make the component invalid. Can someone please help?

SetInvalidDetails('Either ' . ParameterName() . ' or Parameter2 must be non-empty.');
Parameter() IS DEFINED AND Parameter() NE ''

If I define Parameter on the protocol level (as a String Array) and I create a Custom Filter with this send the output to the fail port:

@Parameter IS DEFINED AND @Parameter NE ''