form_set_error: How to set for an array Drupal 6 Array
(
    [items] =&gt; Array
        (
            [0] =&gt; Array
                (
                    [nid] =&gt; 164
                    [module] =&gt; uc_product
                    [remove] =&gt; Remove
                    [title] =&gt; Strokes1
                    [data] =&gt; a:4:{s:10:"attributes";a:0:{}s:9:"shippable";s:1:"0";s:12:"restrict_qty";s:1:"0";s:6:"module";s:10:"uc_product";}
                    [qty] =&gt; 2
                    [description] =&gt; 
                    [cart_item_id] =&gt; 200
                )

            [1] =&gt; Array
                (
                    [nid] =&gt; 165
                    [module] =&gt; uc_product
                    [remove] =&gt; Remove
                    [title] =&gt; Strokes2
                    [data] =&gt; a:4:{s:10:"attributes";a:0:{}s:9:"shippable";s:1:"0";s:12:"restrict_qty";s:1:"0";s:6:"module";s:10:"uc_product";}
                    [qty] =&gt; 1
                    [description] =&gt; 
                    [cart_item_id] =&gt; 203
                )

            [2] =&gt; Array
                (
                    [nid] =&gt; 166
                    [module] =&gt; uc_product
                    [remove] =&gt; Remove
                    [title] =&gt; Strokes3
                    [data] =&gt; a:4:{s:10:"attributes";a:0:{}s:9:"shippable";s:1:"0";s:12:"restrict_qty";s:1:"0";s:6:"module";s:10:"uc_product";}
                    [qty] =&gt; 1
                    [description] =&gt; 
                    [cart_item_id] =&gt; 204
                )

        )

    [update] =&gt; Update cart
    [checkout] =&gt; Checkout
    [form_build_id] =&gt; form-5c5819d5418df14f08153f1ce15d6acc
    [form_token] =&gt; 2341b9068b8ffb7454d267b22e572d7d
    [form_id] =&gt; uc_cart_view_form
)


I'm using form_set_error to display the error messages if there is no product.

My Issue is:

For example, I am having 3 products in the checkout page.

When I clicks submit I need to validate that all the products are available.

Here, let us consider if the second product is not available I am showing the error message "Product Stroke 2 is not available".

But all the check boxes in the cart is highlighted

Because I had set form_set_error to items element.

How can I set form_set_error for every individual element.

What I have given to display error message:

form_set_error('items', 'Not available');

Kindly guide me how to resolve the issue. I am using ubercart module with drupal 6.
There is a comment on the API page for form_set_error which explains how to set a form error on a subelement of a form item.

From the comment: 

form_set_error('field_name][i][value', t('Your message'));