public static function checkZipCode($zipCode) {
        $zipCode = self::cleanZipCode($zipCode);

        if (!empty($zipCode) && strlen($zipCode) > self::$_inputFldMaxLength['ZipCode']) {
            $errorMessage = 'The value for zip code can be no more than ' . self::$_inputFldMaxLength['ZipCode'] . ' characters, Please try again after making corrections';
            throw new HpsInvalidRequestException(
            HpsExceptionCodes::INVALID_ZIP_CODE, $errorMessage
            );
        }
        return $zipCode;
    }
public static function checkZipCode($zipCode) {
        $zipCode = self::cleanZipCode($zipCode);

        if (!empty($zipCode) && strlen($zipCode) > self::$_inputFldMaxLength['ZipCode']) {
            $errorMessage = 'The value for zip code can be no more than ' . self::$_inputFldMaxLength['ZipCode'] . ' characters, Please try again after making corrections';
            throw new HpsInvalidRequestException(
            HpsExceptionCodes::INVALID_ZIP_CODE, $errorMessage
            );
        }
        return $zipCode;
    }
public static function checkZipCode ( $ zipCode ) { $ zipCode = self :: cleanZipCode ( $ zipCode ) ; if ( ! empty ( $ zipCode ) && strlen ( $ zipCode ) > self :: $ _inputFldMaxLength [ 'ZipCode' ] ) { $ errorMessage = 'The value for zip code can be no more than ' . self :: $ _inputFldMaxLength [ 'ZipCode' ] . ' characters, Please try again after making corrections' ; throw new HpsInvalidRequestException ( HpsExceptionCodes :: INVALID_ZIP_CODE , $ errorMessage ) ; } return $ zipCode ; }
This method clears the user input and return the Zip code in correct format or throw an exception

@param string $zipCode this is user entered zip code
@return string
@throws HpsInvalidRequestException
This method clears the user input and return the Zip code in correct format or throw an exception