def validate_parameters(value, ctx=None):
    """Validate 'parameters' dict."""
    parameters = value.get_dict()
    try:
        plot_num = parameters['INPUTPP']['plot_num']
    except KeyError:
        return 'parameter `INPUTPP.plot_num` must be explicitly set'
    if plot_num in range(23) and plot_num not in [14, 15, 16]:
        parameters['INPUTPP']['plot_num'] = int(plot_num)
    else:
        return (
            '`INTPUTPP.plot_num` must be an integer in the range 0-23 excluding [14, 15, 16]'
            )
    try:
        dimension = parameters['PLOT']['iflag']
    except KeyError:
        return 'parameter `PLOT.iflag` must be explicitly set'
    if dimension in range(5):
        parameters['PLOT']['iflag'] = int(dimension)
    else:
        return '`PLOT.iflag` must be an integer in the range 0-4'
