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

Attribute Customisation - Field Validation

Hi
I have a requirement in RTC to validate attribute content to the following format :-
<PROJECT_TYPE>_ROM<YYYYDDMM>-<NUMBER> example: WR_ROM20121210-40
PROJECT_TYPE can be any of -  WR, FD or UP

In RTC I have created an attribute Validator in the form of a regular expression :-

^[WRFDUP]{2}_ROM(19|20|21)\d\d(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01])-\d{2}

Is there a better way I could validate this string? There is no requirement for the date part to be specifically in the past or future just that it must be in YYYYMMDD format and have valid values and that the whole string be in the specific format.

Thanks

0 votes



One answer

Permanent link
I am not aware of any easier way. You can look up proposals for reg exp in the internet using 'regular expression date' as search term. To enhance usability you could also try to use a string attribute for the string part and validate with reg exp, use a time stamp attribute and then use a script based calculated value provider to compose the result maybe as read only attribute.
 

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
× 10,937

Question asked: Oct 25 '12, 3:26 a.m.

Question was seen: 4,646 times

Last updated: Oct 25 '12, 4:04 a.m.

Confirmation Cancel Confirm