It's all about the answers!

Ask a question

Why does a regular expression unsing in a validator returns different behavior in web and eqlipse client?


Nicole Seiffert (134) | asked Dec 08 '14, 9:35 a.m.
Hi to all,

hope that somebody can help me.

I have the problem, that in the eclipse client a regular expression works fine as validator but in the web client not.

I have defined a very simple regular expression validator for a small string attribute. It should only check if the string is a lastname (ex. Mustermann) without leading or ending whitespaces

I have used the follwing simple reg exp: [a-zA-Z]+

In the test section of the validator it works fine.
When creating a WI with this attribute in eqlipse client: It works fine
When creating a WI with this attribute in web client: It don't work :-(

Any Idea?

Im working on 4.0.6

Thanks in advance

Nicole


Comments
Brian Fleming commented Dec 08 '14, 12:42 p.m.

What browser/version are you using?  What is the behavior in the web client?  Do you see the error or warning icon when an invalid value is entered?


Donald Nong commented Dec 08 '14, 6:07 p.m.

I have not seen different behavior of a regex, but I did see different behavior of a getValue() or getLabel() function. I suggest you debug the code to confirm whether the regex is really applied to the same string in both web and Eclipse client.


Nicole Seiffert commented Dec 09 '14, 3:59 a.m.
I have tested with two browsers

1) Google Chrome : Version 39.0.2171.71 (64-bit)
2) Firefox: 31.2.0

and I have in both the same strange behavior :-(

The beavior should be: When I put a whitespace as first character an error icon should occur, when I delete this whitespace the error icon .should disappear. 

<Whitespace>Mustermann an error icon occurs in validator test section and when I create a WI with this attribute in the eqlipse client.

When I write <Whitespace>Mustermann in Web Client (it doesn't matter if chrome or firefox)...I put the whitespace as first char...nothing happen...I put the "M" error icon occurs...I put the "u"...error icon is still there...I put the "s" the error icon disappears. I write "termann" the error icon is still gone and does not appears. 

Nicole Seiffert commented Dec 09 '14, 3:59 a.m.

 How can I debug this? I have no javascript code written. When I create a RegExp Validatior at Process Configuration --> Project Configuration --> Configuration Data --> Attribute Customization --> Validators...I only can define the regular expression.

When I toggle the browser with "F12" into debug mode I see nothing. Maybe you can tell me where and how I can do the debug.

Be the first one to answer this question!


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.