← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3231: WIP: more js/validation in datadictionary

 

------------------------------------------------------------
revno: 3231
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-03-31 14:05:54 +0200
message:
  WIP: more js/validation in datadictionary
added:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/addIndicatorForm.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/addIndicatorGroupForm.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/updateIndicatorForm.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/updateIndicatorGroupForm.js
modified:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addIndicatorForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addIndicatorGroupForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateIndicatorForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateIndicatorGroupForm.vm


--
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-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-03-31 11:17:07 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js	2011-03-31 12:05:54 +0000
@@ -167,5 +167,42 @@
 		"name" : {
 			"rangelength" : [ 2, 230 ]
 		}
+	},
+	"indicator" : {
+		"name" : {
+			"rangelength" : [ 3, 150 ],
+			"alphanumericwithbasicpuncspaces" : true,
+			"firstletteralphabet" : true
+		},
+		"shortName" : {
+			"rangelength" : [ 2, 20 ],
+			"alphanumericwithbasicpuncspaces" : true,
+			"firstletteralphabet" : true
+		},
+		"alternativeName" : {
+			"rangelength" : [ 3, 150 ],
+			"alphanumericwithbasicpuncspaces" : true,
+			"firstletteralphabet" : true
+		},
+		"code" : {
+			"rangelength" : [ 3, 25 ],
+			"alphanumericwithbasicpuncspaces" : true,
+			"notOnlyDigits" : true
+		},
+		"description" : {
+			"rangelength" : [ 3, 250 ],
+			"alphanumericwithbasicpuncspaces" : true,
+			"firstletteralphabet" : true
+		},
+		"url" : {
+			"rangelength" : [ 0, 255 ]
+		}
+	},
+	"indicatorGroup" : {
+		"name" : {
+			"rangelength" : [ 3, 150 ],
+			"alphanumericwithbasicpuncspaces" : true,
+			"firstletteralphabet" : true
+		}
 	}
 }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addIndicatorForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addIndicatorForm.vm	2011-03-30 11:17:23 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addIndicatorForm.vm	2011-03-31 12:05:54 +0000
@@ -1,18 +1,5 @@
+<script type="text/javascript" src="javascript/addIndicatorForm.js"></script>
 <script type="text/javascript">
-	jQuery(document).ready(	function() {
-		validation( 'addIndicatorForm', 
-			function( form )
-			{ 
-				form.submit()
-			}
-		);	
-
-		checkValueIsExist( "name", "validateIndicator.action" );
-		checkValueIsExist( "shortName", "validateIndicator.action" );
-		checkValueIsExist( "alternativeName", "validateIndicator.action" );
-		checkValueIsExist( "code", "validateIndicator.action" );
-	});
-
 	var previousName = '';
 </script>
 
@@ -34,23 +21,23 @@
 	</tr>
 	<tr>
 		<td><label for="name">$i18n.getString( "name" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
-		<td><input type="text" id="name" name="name" onchange="nameChanged()" style="width:20em" maxlength="150" class="{validate:{required:true,minlength:3,alphanumericwithbasicpuncspaces:true,firstletteralphabet:true}}"/></td>
+		<td><input type="text" id="name" name="name" onchange="nameChanged()" style="width:20em"/></td>
 	</tr>
 	<tr>
 		<td><label for="shortName">$i18n.getString( "short_name" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
-		<td><input type="text" id="shortName" name="shortName" maxlength="20" style="width:20em" class="{validate:{required:true,minlength:2,alphanumericwithbasicpuncspaces:true,firstletteralphabet:true}}"/></td>
+		<td><input type="text" id="shortName" name="shortName" style="width:20em"/></td>
 	</tr>
 	<tr>
 		<td><label for="alternativeName">$i18n.getString( "alternative_name" )</label></td>
-		<td><input type="text" id="alternativeName" name="alternativeName" style="width:20em" maxlength="150" class="{validate:{minlength:3,alphanumericwithbasicpuncspaces:true,firstletteralphabet:true}}"/></td>
+		<td><input type="text" id="alternativeName" name="alternativeName" style="width:20em"/></td>
 	</tr>
 	<tr>
 		<td><label for="code">$i18n.getString( "code" )</label></td>
-		<td><input type="text" id="code" name="code" style="width:20em" maxlength="25" class="{validate:{minlength:3,alphanumericwithbasicpuncspaces:true,notOnlyDigits:true}}"/></td>
+		<td><input type="text" id="code" name="code" style="width:20em"/></td>
 	</tr>
 	<tr>
 		<td><label for="description">$i18n.getString( "description" )</label></td>
-		<td><textarea id="description" name="description" style="width:20em; height:8em" class="{validate:{rangelength:[3,250],alphanumericwithbasicpuncspaces:true,firstletteralphabet:true}}"></textarea></td>
+		<td><textarea id="description" name="description" style="width:20em; height:8em"></textarea></td>
 	</tr>
 	<tr>
 		<td><label for="annualized">$i18n.getString( "annualized" )</label></td>
@@ -64,7 +51,7 @@
 	<tr>
 		<td><label for="indicatorTypeId">$i18n.getString( "indicator_type" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
 		<td>
-			<select id="indicatorTypeId" name="indicatorTypeId" style="min-width:20em" onchange='indicatorTypeChanged();' class="{validate:{required:true}}">				
+			<select id="indicatorTypeId" name="indicatorTypeId" style="min-width:20em" onchange='indicatorTypeChanged();'>				
 				<option value="">[ $i18n.getString('select') ]</option>
 			#foreach( $indicatorType in $indicatorTypes )
 				<option value="$indicatorType.id" number="$indicatorType.number">$encoder.htmlEncode( $indicatorType.name )</option>
@@ -74,13 +61,13 @@
 	</tr>
     <tr>
         <td><label for="url">$i18n.getString( "url" )</label></td>
-        <td><input type="text" id="url" name="url" style="width:20em" maxlength="255" class="{validate:{url:true}}"/></td>
+        <td><input type="text" id="url" name="url" style="width:20em"/></td>
     </tr>
 	<tr>
 		<td></td>
 		<td>
 			<input type="button" value="$i18n.getString( 'edit_numerator' )" onclick="indicatorNumeratorForm()" style="width:20em"/>
-			<input type="hidden" id="numerator" name="numerator" class="{validate:{required:true}}"/>
+			<input type="hidden" id="numerator" name="numerator"/>
 		</td>	
 	</tr>
 	<tr>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addIndicatorGroupForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addIndicatorGroupForm.vm	2011-03-18 14:14:32 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addIndicatorGroupForm.vm	2011-03-31 12:05:54 +0000
@@ -1,16 +1,4 @@
-<script type="text/javascript">
-	jQuery(document).ready(	function(){
-		validation( 'addIndicatorGroupForm', function( form ){ form.submit()}, function(){
-			listValidator( 'memberValidator', 'groupMembers' );
-		} );	
-		
-		checkValueIsExist( "name", "validateIndicatorGroup.action");
-
-		var nameField = document.getElementById( 'name' );
-		nameField.select();
-		nameField.focus();
-	});
-</script>
+<script type="text/javascript" src="javascript/addIndicatorGroupForm.js"></script>
 
 <h3>$i18n.getString( "create_new_indicator_group" )</h3>
 
@@ -22,7 +10,7 @@
 	</tr>
 	<tr>
 		<td><label for="name">$i18n.getString( "name" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
-		<td><input type="text" id="name" name="name" style="width:20em" maxlength="150" class="{validate:{required:true,minlength:3,alphanumericwithbasicpuncspaces:true,firstletteralphabet:true}}"/></td>
+		<td><input type="text" id="name" name="name" style="width:20em"/></td>
 	</tr>
 	<tr>
 		<td colspan="2" height="15px"></td>

=== added file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/addIndicatorForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/addIndicatorForm.js	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/addIndicatorForm.js	2011-03-31 12:05:54 +0000
@@ -0,0 +1,61 @@
+jQuery(document).ready(function() {
+	var r = getValidationRules();
+
+	var rules = {
+		name : {
+			required : true,
+			rangelength : r.indicator.name.rangelength,
+			alphanumericwithbasicpuncspaces : r.indicator.name.alphanumericwithbasicpuncspaces,
+			firstletteralphabet : r.indicator.name.firstletteralphabet
+		},
+		shortName : {
+			required : true,
+			rangelength : r.indicator.shortName.rangelength,
+			alphanumericwithbasicpuncspaces : r.indicator.shortName.alphanumericwithbasicpuncspaces,
+			firstletteralphabet : r.indicator.shortName.firstletteralphabet
+		},
+		alternativeName : {
+			rangelength : r.indicator.alternativeName.rangelength,
+			alphanumericwithbasicpuncspaces : r.indicator.alternativeName.alphanumericwithbasicpuncspaces,
+			firstletteralphabet : r.indicator.alternativeName.firstletteralphabet
+		},
+		code : {
+			rangelength : r.indicator.code.rangelength,
+			alphanumericwithbasicpuncspaces : r.indicator.code.alphanumericwithbasicpuncspaces,
+			notOnlyDigits : r.indicator.code.notOnlyDigits
+		},
+		description : {
+			rangelength : r.indicator.description.rangelength,
+			alphanumericwithbasicpuncspaces : r.indicator.description.alphanumericwithbasicpuncspaces,
+			firstletteralphabet : r.indicator.description.firstletteralphabet
+		},
+		indicatorTypeId : {
+			required : true
+		},
+		url : {
+			url : true,
+			rangelength : r.indicator.url.rangelength
+		},
+		denominator : {
+			required : true
+		}
+	};
+
+	validation2('addIndicatorForm', function(form) {
+		form.submit();
+	}, {
+		'rules' : rules
+	});
+
+	jQuery("#name").attr("maxlength", r.indicator.name.rangelength[1]);
+	jQuery("#shortName").attr("maxlength", r.indicator.shortName.rangelength[1]);
+	jQuery("#alternativeName").attr("maxlength", r.indicator.alternativeName.rangelength[1]);
+	jQuery("#code").attr("maxlength", r.indicator.code.rangelength[1]);
+	jQuery("#description").attr("maxlength", r.indicator.description.rangelength[1]);
+	jQuery("#url").attr("maxlength", r.indicator.url.rangelength[1]);
+
+	checkValueIsExist("name", "validateIndicator.action");
+	checkValueIsExist("shortName", "validateIndicator.action");
+	checkValueIsExist("alternativeName", "validateIndicator.action");
+	checkValueIsExist("code", "validateIndicator.action");
+});

=== added file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/addIndicatorGroupForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/addIndicatorGroupForm.js	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/addIndicatorGroupForm.js	2011-03-31 12:05:54 +0000
@@ -0,0 +1,29 @@
+jQuery(document).ready(function() {
+	var r = getValidationRules();
+
+	var rules = {
+		name : {
+			required : true,
+			rangelength : r.indicatorGroup.name.rangelength,
+			alphanumericwithbasicpuncspaces : true,
+			firstletteralphabet : true
+		}
+	};
+
+	validation2('addIndicatorGroupForm', function(form) {
+		form.submit()
+	}, {
+		'beforeValidateHandler' : function() {
+			listValidator('memberValidator', 'groupMembers');
+		},
+		'rules' : rules
+	});
+
+	jQuery("#name").attr("maxlength", r.indicatorGroup.name.rangelength[1]);
+
+	checkValueIsExist("name", "validateIndicatorGroup.action");
+
+	var nameField = document.getElementById('name');
+	nameField.select();
+	nameField.focus();
+});

=== added file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/updateIndicatorForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/updateIndicatorForm.js	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/updateIndicatorForm.js	2011-03-31 12:05:54 +0000
@@ -0,0 +1,69 @@
+jQuery(document).ready(function() {
+	var r = getValidationRules();
+
+	var rules = {
+		name : {
+			required : true,
+			rangelength : r.indicator.name.rangelength,
+			alphanumericwithbasicpuncspaces : r.indicator.name.alphanumericwithbasicpuncspaces,
+			firstletteralphabet : r.indicator.name.firstletteralphabet
+		},
+		shortName : {
+			required : true,
+			rangelength : r.indicator.shortName.rangelength,
+			alphanumericwithbasicpuncspaces : r.indicator.shortName.alphanumericwithbasicpuncspaces,
+			firstletteralphabet : r.indicator.shortName.firstletteralphabet
+		},
+		alternativeName : {
+			rangelength : r.indicator.alternativeName.rangelength,
+			alphanumericwithbasicpuncspaces : r.indicator.alternativeName.alphanumericwithbasicpuncspaces,
+			firstletteralphabet : r.indicator.alternativeName.firstletteralphabet
+		},
+		code : {
+			rangelength : r.indicator.code.rangelength,
+			alphanumericwithbasicpuncspaces : r.indicator.code.alphanumericwithbasicpuncspaces,
+			notOnlyDigits : r.indicator.code.notOnlyDigits
+		},
+		description : {
+			rangelength : r.indicator.description.rangelength,
+			alphanumericwithbasicpuncspaces : r.indicator.description.alphanumericwithbasicpuncspaces,
+			firstletteralphabet : r.indicator.description.firstletteralphabet
+		},
+		indicatorTypeId : {
+			required : true
+		},
+		url : {
+			url : true,
+			rangelength : r.indicator.url.rangelength
+		},
+		denominator : {
+			required : true
+		}
+	};
+
+	validation2('updateIndicatorForm', function(form) {
+		form.submit();
+	}, {
+		'rules' : rules
+	});
+
+	jQuery("#name").attr("maxlength", r.indicator.name.rangelength[1]);
+	jQuery("#shortName").attr("maxlength", r.indicator.shortName.rangelength[1]);
+	jQuery("#alternativeName").attr("maxlength", r.indicator.alternativeName.rangelength[1]);
+	jQuery("#code").attr("maxlength", r.indicator.code.rangelength[1]);
+	jQuery("#description").attr("maxlength", r.indicator.description.rangelength[1]);
+	jQuery("#url").attr("maxlength", r.indicator.url.rangelength[1]);
+
+	checkValueIsExist("name", "validateIndicator.action", {
+		id : getFieldValue('id')
+	});
+	checkValueIsExist("shortName", "validateIndicator.action", {
+		id : getFieldValue('id')
+	});
+	checkValueIsExist("alternativeName", "validateIndicator.action", {
+		id : getFieldValue('id')
+	});
+	checkValueIsExist("code", "validateIndicator.action", {
+		id : getFieldValue('id')
+	});
+});

=== added file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/updateIndicatorGroupForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/updateIndicatorGroupForm.js	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/updateIndicatorGroupForm.js	2011-03-31 12:05:54 +0000
@@ -0,0 +1,23 @@
+jQuery(document).ready(function() {
+	var r = getValidationRules();
+
+	var rules = {
+		name : {
+			required : true,
+			rangelength : r.indicatorGroup.name.rangelength,
+			alphanumericwithbasicpuncspaces : true,
+			firstletteralphabet : true
+		}
+	};
+
+	validation2('updateIndicatorGroupForm', function(form) {
+		form.submit()
+	}, {
+		'beforeValidateHandler' : function() {
+			listValidator('memberValidator', 'groupMembers');
+		},
+		'rules' : rules
+	});
+
+	jQuery("#name").attr("maxlength", r.indicatorGroup.name.rangelength[1]);
+});

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateIndicatorForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateIndicatorForm.vm	2011-03-18 14:14:32 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateIndicatorForm.vm	2011-03-31 12:05:54 +0000
@@ -1,15 +1,4 @@
-<script type="text/javascript">
-	jQuery(document).ready(	function(){
-		validation( 'updateIndicatorForm', 
-			function( form ){ form.submit()}
-		);	
-
-		checkValueIsExist( "name", "validateIndicator.action", {id:getFieldValue('id')});
-		checkValueIsExist( "shortName", "validateIndicator.action" , {id:getFieldValue('id')});
-		checkValueIsExist( "alternativeName", "validateIndicator.action" , {id:getFieldValue('id')});
-		checkValueIsExist( "code", "validateIndicator.action" , {id:getFieldValue('id')});
-	});
-</script>
+<script type="text/javascript" src="javascript/updateIndicatorForm.js"></script>
 
 <h3>$i18n.getString( "edit_indicator" )</h3>
 
@@ -31,23 +20,23 @@
 	</tr>
 	<tr>
 		<td><label for="name">$i18n.getString( "name" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
-		<td><input type="text" id="name" name="name" value="$encoder.htmlEncode( $indicator.name )" maxlength="150" style="width:20em" class="{validate:{required:true,minlength:3,alphanumericwithbasicpuncspaces:true,firstletteralphabet:true}}"/></td>
+		<td><input type="text" id="name" name="name" value="$encoder.htmlEncode( $indicator.name )" style="width:20em"/></td>
 	</tr>
 	<tr>
 		<td><label for="shortName">$i18n.getString( "short_name" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
-		<td><input type="text" id="shortName" name="shortName" maxlength="20" value="$encoder.htmlEncode( $indicator.shortName )" style="width:20em" class="{validate:{required:true,minlength:2,alphanumericwithbasicpuncspaces:true,firstletteralphabet:true}}"/></td>
+		<td><input type="text" id="shortName" name="shortName" value="$encoder.htmlEncode( $indicator.shortName )" style="width:20em"/></td>
 	</tr>
 	<tr>
 		<td><label for="alternativeName">$i18n.getString( "alternative_name" )</label></td>
-		<td><input type="text" id="alternativeName" name="alternativeName" maxlength="150" value="$!encoder.htmlEncode( $indicator.alternativeName )" style="width:20em" class="{validate:{minlength:3,alphanumericwithbasicpuncspaces:true,firstletteralphabet:true}}"/></td>
+		<td><input type="text" id="alternativeName" name="alternativeName" value="$!encoder.htmlEncode( $indicator.alternativeName )" style="width:20em"/></td>
 	</tr>
 	<tr>
 		<td><label for="code">$i18n.getString( "code" )</label></td>
-		<td><input type="text" id="code" name="code" maxlength="25" value="$!encoder.htmlEncode( $indicator.code )" style="width:20em" class="{validate:{minlength:3,alphanumericwithbasicpuncspaces:true,notOnlyDigits:true}}"/></td>
+		<td><input type="text" id="code" name="code" value="$!encoder.htmlEncode( $indicator.code )" style="width:20em"/></td>
 	</tr>
 	<tr>
 		<td><label for="description">$i18n.getString( "description" )</label></td>
-		<td><textarea id="description" name="description" maxlength="250" style="width:20em; height:8em" class="{validate:{minlength:3,alphanumericwithbasicpuncspaces:true,firstletteralphabet:true}}">$!encoder.htmlEncode( $indicator.description )</textarea></td>
+		<td><textarea id="description" name="description" style="width:20em; height:8em">$!encoder.htmlEncode( $indicator.description )</textarea></td>
 	</tr>
 	<tr>
 		<td><label for="annualized">$i18n.getString( "annualized" )</label></td>
@@ -61,7 +50,7 @@
 	<tr>
 		<td><label for="indicatorTypeId">$i18n.getString( "indicator_type" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
 		<td>
-			<select id="indicatorTypeId" name="indicatorTypeId" style="min-width:20em" onchange='indicatorTypeChanged();' class="{validate:{required:true}}">			
+			<select id="indicatorTypeId" name="indicatorTypeId" style="min-width:20em" onchange='indicatorTypeChanged();'>			
 			#foreach( $indicatorType in $indicatorTypes )
 				<option value="$indicatorType.id" number="$indicatorType.number" #if( $indicator.indicatorType.id == $indicatorType.id ) selected="selected"#end>$encoder.htmlEncode( $indicatorType.name )</option>
 			#end
@@ -70,20 +59,20 @@
 	</tr>
     <tr>
         <td><label for="url">$i18n.getString( "url" )</label></td>
-        <td><input type="text" id="url" name="url" maxlength="255" value="$!encoder.htmlEncode( $indicator.url )" style="width:20em" class="{validate:{url:true}}"/></td>
+        <td><input type="text" id="url" name="url" value="$!encoder.htmlEncode( $indicator.url )" style="width:20em"/></td>
     </tr>
 	<tr>
 		<td></td>
 		<td>
 			<input type="button" value="$i18n.getString( 'edit_numerator' )" onclick="indicatorNumeratorForm()" style="width:20em"/>
-			<input type="hidden" id="numerator" name="numerator" value="$!indicator.numerator" class="{validate:{required:true}}"/>
+			<input type="hidden" id="numerator" name="numerator" value="$!indicator.numerator"/>
 		</td>		
 	</tr>
 	<tr>
 		<td></td>
 		<td>
 			<input type="button" id="denominatorButton" name="denominatorButton" value="$i18n.getString( 'edit_denominator' )" onclick="indicatorDenominatorForm()" style="width:20em"  #if($!indicator.indicatorType.number=='true') disabled #end/>
-			<input type="hidden" id="denominator" name="denominator" value="$!indicator.denominator" class="{validate:{required:true}}"/>
+			<input type="hidden" id="denominator" name="denominator" value="$!indicator.denominator"/>
 		</td>
 	</tr>
 	<tr>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateIndicatorGroupForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateIndicatorGroupForm.vm	2011-03-18 14:14:32 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateIndicatorGroupForm.vm	2011-03-31 12:05:54 +0000
@@ -1,9 +1,6 @@
+<script type="text/javascript" src="javascript/updateIndicatorGroupForm.js"></script>
 <script type="text/javascript">
 	jQuery(document).ready(	function(){
-		validation( 'updateIndicatorGroupForm', function( form ){ form.submit()}, function(){
-			listValidator( 'memberValidator', 'groupMembers' );
-		} );	
-		
 		checkValueIsExist( "name", "validateIndicatorGroup.action", {id: $indicatorGroup.id});
 	});
 </script>
@@ -22,7 +19,7 @@
 	</tr>
 	<tr>
 		<td><label for="name">$i18n.getString( "name" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
-		<td><input type="text" id="name" name="name" value="$encoder.htmlEncode( $indicatorGroup.name )" style="width:20em" maxlength="150" class="{validate:{required:true,minlength:3,alphanumericwithbasicpuncspaces:true,firstletteralphabet:true}}"/></td>
+		<td><input type="text" id="name" name="name" value="$encoder.htmlEncode( $indicatorGroup.name )" style="width:20em"/></td>
 	</tr>
 	<tr>
 		<td colspan="2" height="15px"></td>