← Back to team overview

dhis2-devs team mailing list archive

Re: [Branch ~dhis2-devs-core/dhis2/trunk] Rev 3603: Removed silly validation rule

 

Having the first character as not digit is not silly...
It is considered by many as good practice...

---
Regards,
Saptarshi PURKAYASTHA

My Tech Blog:  http://sunnytalkstech.blogspot.com
You Live by CHOICE, Not by CHANCE


On 12 May 2011 19:40, <noreply@xxxxxxxxxxxxx> wrote:

> ------------------------------------------------------------
> revno: 3603
> committer: Lars Helge Overland <larshelge@xxxxxxxxx>
> branch nick: dhis2
> timestamp: Thu 2011-05-12 19:38:50 +0200
> message:
>  Removed silly validation rule
> modified:
>
>  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/DefaultDataEntryFormService.java
>
>  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js
>
>
> --
> 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-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/DefaultDataEntryFormService.java'
> ---
> dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/DefaultDataEntryFormService.java
>   2011-05-12 09:25:07 +0000
> +++
> dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/DefaultDataEntryFormService.java
>   2011-05-12 17:38:50 +0000
> @@ -213,7 +213,7 @@
>                 // Insert name of indicator as value and title
>                 //
> -------------------------------------------------------------
>
> -                String displayValue = indicator != null ? "value=\"[ " +
> indicator.getName() + "]\"" : "[ Indicator does not exist ]";
> +                String displayValue = indicator != null ? "value=\"[ " +
> indicator.getName() + " ]\"" : "[ Indicator does not exist ]";
>                 String displayTitle = indicator != null ? "title=\"" +
> indicator.getName() + "\"" : "[ Indicator does not exist ]";
>
>                 inputHtml = inputHtml.contains( EMPTY_VALUE_TAG ) ?
> inputHtml.replace( EMPTY_VALUE_TAG, displayValue ) : inputHtml + " " +
> displayValue;
>
> === modified file
> 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js'
> ---
> dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js
>  2011-05-11 07:32:33 +0000
> +++
> dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js
>  2011-05-12 17:38:50 +0000
> @@ -54,8 +54,7 @@
>                "name" : {
>                        "required" : true,
>                        "rangelength" : [ 2, 210 ],
> -                       "alphanumericwithbasicpuncspaces" : true,
> -                       "firstletteralphabet" : true
> +                       "alphanumericwithbasicpuncspaces" : true
>                },
>                "memberValidator" : {
>                        "required" : true
> @@ -130,13 +129,11 @@
>                "name" : {
>                        "required" : true,
>                        "alphanumericwithbasicpuncspaces" : true,
> -                       "firstletteralphabet" : false,
>                        "rangelength" : [ 4, 150 ]
>                },
>                "shortName" : {
>                        "required" : true,
>                        "alphanumericwithbasicpuncspaces" : true,
> -                       "firstletteralphabet" : false,
>                        "rangelength" : [ 2, 25 ]
>                },
>                "code" : {
> @@ -248,7 +245,6 @@
>                        "required" : true,
>                        "alphanumericwithbasicpuncspaces" : true,
>                        "notOnlyDigits" : true,
> -                       "firstletteralphabet" : true,
>                        "rangelength" : [ 3, 150 ]
>                }
>        },
> @@ -286,13 +282,11 @@
>                "shortName" : {
>                        "required" : true,
>                        "rangelength" : [ 2, 25 ],
> -                       "alphanumericwithbasicpuncspaces" : true,
> -                       "firstletteralphabet" : true
> +                       "alphanumericwithbasicpuncspaces" : true
>                },
>                "alternativeName" : {
>                        "rangelength" : [ 3, 150 ],
> -                       "alphanumericwithbasicpuncspaces" : true,
> -                       "firstletteralphabet" : true
> +                       "alphanumericwithbasicpuncspaces" : true
>                },
>                "code" : {
>                        "rangelength" : [ 0, 25 ],
> @@ -301,8 +295,7 @@
>                },
>                "description" : {
>                        "rangelength" : [ 3, 250 ],
> -                       "alphanumericwithbasicpuncspaces" : true,
> -                       "firstletteralphabet" : true
> +                       "alphanumericwithbasicpuncspaces" : true
>                },
>                "url" : {
>                        "url" : true,
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>

Follow ups

References