Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Problem with regular expression on string validator (URGENT pls)

I have a string attribute to simulate a floating type (unfortunately, not using 4.0.1 yet).

I have a string custom attribute, and now trying to add a validation using a regular expression.
This field has to contain a number in the 0-100 range, without decimals, or if decimals, up to tenth (up to 2 decimals only).

My expression is:
(100)|(\d{1,2})|(\d{1,2}[.]\d{1,2})
although I also tried
(100)|(\d{1,2})|(\d{1,2}\.\d{1,2})

which works fine in the sample text box, but within a workitem (either Eclipse or Web), the behavior is not the same, and it does not accept numbers with decimals.
What am I doing wrong?
--Claudia

0 votes


Accepted answer

Permanent link
 Hi Claudia,

Claudia Callegari selected this answer as the correct answer

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 6,123

Question asked: Jan 10 '13, 3:51 p.m.

Question was seen: 5,223 times

Last updated: Jan 14 '13, 12:38 p.m.

Confirmation Cancel Confirm