Skip validation

Hi

I have a textbox field where I want the user to enter in a year. I’ve set up validation to use a the regular expression (19|20)\d\d. This field is optional so I’ve checked the box “Skip validation if field is empty” but the validation still runs nothing is entered in the field.

I’ve got around this by adding a prerequisite to check whether the field is not null.

Is this is known issue?

Rhythmyx 6.5.2

Cheers
James

I’m pretty sure that this is a known issue. We have/had the same problems in 6.5 and we just upgraded to 6.5.2. From Tech Support, I have been given their bug tracking number (RX-13022)

That’s correct - that bug affects versions 6.5 through 6.5.2 and is scheduled to be fixed in the next release (tentatively called 6.6, due out at the end of the year). In the meantime you can work around this by adding a condition to the field validation rule to validate either that it is empty OR that it matches the rule you are already testing.

Hi,
To you have a bug traking number for this issue ?
Thanks,

Guillaume

Check Jitendra’s post, two down from yours.

Oups sorry for that.
Thanks,
Guillaume

James,

The bugid mentioned in this thread is actually a special case that may not apply to you. The ‘skip validation if empty’ didn’t work in that case because they had 2 sys_File controls in their editor.

I created a field in a ctype and added the validation as you described and it worked for me.

Do you have 2 or more sys_File controls in your editor (same question to others who have experienced this problem?) If not, can you connect your CX thru tcptrace and post the results from submitting the new instance of the ctype having the problem?

I hit this bug due to having multiple sys_file controls in my editor. After some time I figured out a round-about way to implement the suggest workaround.

First problem I ran into was that I couldn’t select OR in the conditional…is there some trick to doing this?

I ended up hacking the ce XML to replace the AND with OR in the PSXRule node in PSXField

<PSXRule boolean=“or”>

Then only way that I know of checking if a field is empty is by using a JEXL statement:

So my Rule was

JEXL(empty($value)) OR
Regular Expression

That did the trick.

-Veeren

We highlighted this bug six months ago.

We have found that the “Skip validation if field is empty” checkbox is pretty much pointless and does not work.

We have asked Tech Support on several occasions, the point of this checkbox, if it does not work, with no answer to the problem apart from to add a very long and convoluted solution (the conditional fix and that does not work).

We would really like to be able to use regular expressions to validate items, but I have not come across any fix that works yet, although it might be worth us looking at what [FONT=Verdana][SIZE=2]Veeren has done.[/SIZE][/FONT]

I am only aware of the ‘Skip val…’ checkbox not working in 1 special case, when there are multiple sys_File controls. Otherwise, it works in my tests. If you have a different case, I would like to see it as this will help us make sure the problem is fully addressed when it is fixed.
There are multiple, simple work-arounds, so I am at a loss as to why this is not yet working for you. Veeren’s fix can be done w/o editing the xml (using AND) by adding a negation operator to the JEXL statement (!empty($value)).
A conditional can be added instead of the JEXL statement to accomplish the same thing. If your field name was ‘test’, then choose the variable of the conditional as a Single HTML Parameter/test and the OP as IS NOT NULL.
These checks can be placed in the Pre-requisites list or directly in the validations list.
I would like to find any additional bugs and get this working for you.

Hello Paul,

I work with Georgina (mcai7gh2) who unfortunately cannot reply right now because her computer has died.

Trying skip validation again, it seems you are correct, we no longer have the problem Georgina described (skip validation checkbox having no effect when combined with regular expression validation.) Checking the patch history, it seems that there was a patch some time again that included a fix to RX-13022, a bug described as “Skip Validation if field is empty does not work properly.” (BTW, it would be helpful if these descriptions contained more details.)

We had not been told this had been fixed despite reporting it back in February.

Andrew.

A patch was released in May, Rx-13375, that included that fix.