Gemini Community Support Site

This Gemini community support site can be used to find solutions to product issues. You can log in using Open Id, Google Profile and even Facebook. Feel free to ask a question or browse FAQs and documentation. Product tour videos are also available along with how-to videos demonstrating key Gemini capabilities.




Custom fields => Regular expression for validation (optional)

web-app

I added a new Custom field: "Proposed Date".

I want to make sure that everybody only uses the following format when using the date filed.

The format should be: DD/MM/YYYY

How can I realize this? There is a field available when creating a new custom field called:

"Regular expression for validation (optional)".

But what should I put there to validate for: DD/MM/YYYY

 

Thanks in advance

deniz
· 1
deniz
Replies (12)
helpful
0
not helpful

Put the following :

(0[1-9]|[12][0-9]|3[01])- /.- /.\d\d


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

Thanks for the fast response.

I just added the code above to the "Regular expression for validation" field, but when creating or editing issues, the users are still able to add values like "010106" or "23rdFeb06".


deniz
· 1
deniz
helpful
0
not helpful

Should work, test on http://beta.countersoft.com/

Create / edit any issue in the test project. Can you enter any date?

If not then make sure you have entered the correct regular expression.


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

Yes, I've checked at http://beta.countersoft.com in the Test Project and it looks perfect. It is validated immediately when leaving the Date Field. This is absolute great!

But in our Gemini (also 2.0.2) it still dosn't work. Although I used your above mentioned regular expression, the values in the field are not validated and it can be saved anway.

In the Test Issue which I've created I've attached a screenshot which shows the details of my custom field, maybe something should be changed?


Test Issue including Image in Description: http://beta.countersoft.com/issue/ViewIssue.aspx?id=590
Direct Link to Custom Field setup image: http://beta.countersoft.com/issue/FileDownload.aspx?FID=27

Thanks in advance

 

 


deniz
· 1
deniz
helpful
0
not helpful

Seems like an ASP.NET issue on your web server:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cptools/html/cpgrfaspnetiisregistrationtoolaspnet_regiisexe.asp

  Run this tool with "-c" option and should fix your problem.


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

Excellent, the magic "-c" solved the problem. :)

Thank you very much!


deniz
· 1
deniz
helpful
0
not helpful

Hello,

can you explain the statement '(0[1-9]|[12][0-9]|3[01])- /.- /.\d\d'
to me.
I want to create some custom fields, with date and string values.
Does any documentation exists, about creating such expressions for validation?

After adding this statement, the Internet Explorer displays the website, but an error occurs.
It mentioned a missing ';'.
After a correction of a bad input, the failure message does not hide.

I tried it also with Firefox, but Firefox does not show any error message.

Thanks in advance

Peter Ludwig


greenpete
· 1
greenpete
helpful
0
not helpful

deniz
· 1
deniz
helpful
0
not helpful

How did you actually add the field to the CreateIssue.aspx screen? 


jyarrington
· 1
jyarrington
helpful
0
not helpful

By creating a custom field from the project home page -> Project administration


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

Ah, excellent.  Is there a way to put some of the standard fields and hide some of the standard fields on the create issue screen?


jyarrington
· 1
jyarrington
helpful
0
not helpful

Not at the moment.


Mark Wing
· 9108
Mark Wing