Xpage Validation question

I am trying to write a validation on a XPages app where one field is required only when another is not empty.

Example:

Have 2 fields Name and Size

When Name isn’t empty, I want to require Size.

Here is what I am using in the “Computed value” for the Required Field area of the Validation of the Size field:

!(document1.getItemValueSting(“Name”).isEmpty())

But my Size is always required.

What am I doing wrong?

Subject: Computed Value for Required Field, Possible bug?

I started looking at this closer. I tried making the Computed “Required field” value to be true and also tried false and in both cases it is still is required.

Is this a bug or do I not understand how to use a computed value for the “Required field” setting?