← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1426: Final regex adjustment allows for numerals following first letter. These are all ok:

 

------------------------------------------------------------
revno: 1426
committer: Bob Jolliffe <bobj@bobj-laptop>
branch nick: trunk
timestamp: Fri 2010-02-12 13:52:57 +0000
message:
  Final regex adjustment allows for numerals following first letter.  These are all ok:
  AGE, age, AGE_hiv, AGE6 , B____
  These are not:
  _AGE, AGE#, THE_AGE_OF_MY_GRANDMOTHER, 8age
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/category/ValidateDataElementCategoryAction.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription.
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/category/ValidateDataElementCategoryAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/category/ValidateDataElementCategoryAction.java	2010-02-12 13:43:48 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/category/ValidateDataElementCategoryAction.java	2010-02-12 13:52:57 +0000
@@ -125,7 +125,7 @@
             
             // This string will be used as an XML attribute name.  So:
             // Start with a letter. No funny characters please.  max length 10.
-            Pattern conceptNamePattern = Pattern.compile("^[a-zA-Z][a-zA-Z_]{0,9}$");
+            Pattern conceptNamePattern = Pattern.compile("^[a-zA-Z][a-zA-Z0-9_]{0,9}$");
             Matcher matcher = conceptNamePattern.matcher(conceptName);
 
             if (!matcher.matches())


Follow ups