Your rule is defined fine.
However the ShouldHaveValidationErrorFor
is only meant for testing simple cases: to test simple property validation rules. So it is not supporting testing nested properties or arrays (see also this issue)
So you need to test this validation rule "manually":
var validator = new MyClassValidator();
var result = validator.Validate(
new MyClass() { PreferredAirlineCodes = new[] {"CX", "3KK"}});
Assert.IsTrue(
result.Errors.Any(e => e.PropertyName.StartsWith("PreferredAirlineCodes")));