Corrected validation of encoding parameter