Jazz Register Log in
Jazz Forum Welcome to the Jazz Community Forum

Welcome to the Jazz Community Forum

Connect and collaborate with IBM Engineering experts and users

Defining A Default For A Validated HTML String That Has A Specific Format

Basically I am trying to force a name input format as follows:

Last Name, First Name MI (if applicable)

So here is my defined Regular Expression:

[A-Z]{1,20}[,][ ][A-Z]{1,20}[ ]{0,1}[A-Z]{0,2}[.]{0,1}

I know its crazy long but I want to force the "," and " " between the first and last names, but allow the person not to enter a middle initial if they do not have one.  If they do enter a middle initial then there needs to be a space after the "first name" and then 1 or 2 characters followed by a ".".

Here's my dilemma:  I am trying to use a "Default Value" of "Not, defined".  Which is a valid entry.  It follows the format above in the Regular Expression and passes the test, but I get an error in the screen when it displays the default value.  Does "Default Value" put something in the HTML string that I cannot see and therefore it fails??  

0 votes

Comments

Ok, so I take this back.  I just tested this Regular Expression in RTC Client and it worked.  I incorporate it on one of my Attributes and when I enter a name "Last, First", which is the correct format, I still get the pop-up error that this is the wrong format.  Is my Regular Expression no good?  It works when I test it, but not when I assigned it to an actual attribute (HTML Medium String)



One answer

Permanent link

Thanks to IBM Support, this required using a fuller format which included both upper and lower case!

[a-zA-Z] was needed.  This has been resolved.

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
× 12,059

Question asked: May 26 '15, 10:21 p.m.

Question was seen: 3,376 times

Last updated: May 29 '15, 11:06 a.m.

Confirmation Cancel Confirm