← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16332: Used the validationrule.js for all objects in dhis-web-program module.

 

------------------------------------------------------------
revno: 16332
committer: Tran Chau<tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2014-08-06 22:20:54 +0700
message:
  Used the validationrule.js for all objects in dhis-web-program module.
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-program/src/main/resources/org/hisp/dhis/trackedentity/i18n_module.properties
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addAttributeForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addAttributeGroupForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addCaseAggregation.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addProgramForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addProgramIndicator.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addProgramReminder.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addProgramStageForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addProgramStageReminder.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addProgramStageSectionForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addRelationshipTypeForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addSingleProgramValidationForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addTrackedEntity.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addValidationCriteria.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/caseAggregationForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/expressionBuilderForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/addAttributeForm.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/addAttributeGroupForm.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/addCaseAggregationForm.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/addProgramStageForm.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/addRelationshipTypeForm.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/addValidationCriteria.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/programReminder.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/programStageReminder.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/programValidation.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/updateAttributeForm.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/updateAttributeGroupForm.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/updateCaseAggregationForm.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/updateProgramStageForm.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/updateRelationshipTypeForm.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/updateValidationCriteria.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programIndicatorForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/style/basic.css
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateAttibuteForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateAttibuteGroupForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateCaseAggregation.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramIndicator.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramReminder.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramStageForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramStageReminder.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramStageSectionForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateRelationshipTypeForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateSingleProgramValidationForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateTrackedEntity.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateValidationCriteria.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	2014-07-21 08:17:48 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js	2014-08-06 15:20:54 +0000
@@ -458,7 +458,21 @@
 			"required": true
 		}
 	},
-	"patientAttributeGroup" : {
+	"trackedEntityAttribute" : {
+		"name" : {
+			"required" : true,
+			"rangelength" : [ 2,160 ]
+		},
+		"shortName" : {
+			"required" : true,
+			"rangelength" : [ 2, 50 ]
+		},
+		"description" : {
+			"required" : true,
+			"minlength" : 2
+		}
+	},
+	"trackedEntityAttributeGroup" : {
 		"name" : {
 			"required" : true,
 			"rangelength" : [ 2,160 ]

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/resources/org/hisp/dhis/trackedentity/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/resources/org/hisp/dhis/trackedentity/i18n_module.properties	2014-08-04 02:40:12 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/resources/org/hisp/dhis/trackedentity/i18n_module.properties	2014-08-06 15:20:54 +0000
@@ -500,4 +500,5 @@
 available_indicators = Available indicators
 selected_indicators = Selected indicators
 program_indicator_management_form = Program indicator management form
-auto_save_tracked_entity_registration_forms = Auto-save tracked entity registration forms 
\ No newline at end of file
+auto_save_tracked_entity_registration_forms = Auto-save tracked entity registration forms
+filter_by_program = Filter by program 
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addAttributeForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addAttributeForm.vm	2014-07-02 12:11:16 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addAttributeForm.vm	2014-08-06 15:20:54 +0000
@@ -14,13 +14,13 @@
     <tbody>
     <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" class="{validate:{required:true,rangelength:[2,160]}}"/></td>
+        <td><input type="text" id="name" name="name" /></td>
         <td></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" class="{validate:{required:true,rangelength:[2,50]}}"/></td>
+        <td><input type="text" id="shortName" name="shortName" /></td>
         <td></td>
     </tr>
     
@@ -32,7 +32,7 @@
     
     <tr>
         <td><label for="description">$i18n.getString( "description" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
-        <td><input type="text" id="description" name="description" class="{validate:{required:true,minlength:2}}"/></td>
+        <td><textarea id="description" name="description" ></textarea></td>
         <td></td>
     </tr>
 	

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addAttributeGroupForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addAttributeGroupForm.vm	2014-06-02 02:07:05 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addAttributeGroupForm.vm	2014-08-06 15:20:54 +0000
@@ -10,11 +10,11 @@
 	</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" class="{validate:{required:true}}"/></td>
+		<td><input type="text" id="name" name="name" /></td>
 	</tr> 	
 	<tr>
 		<td><label for="description">$i18n.getString( "description" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
-		<td><input type="text" id="description" name="description" class="{validate:{required:true}}"/></td>
+		<td><input type="text" id="description" name="description" /></td>
 	</tr>
 	<tr>
 		<td colspan="2">&nbsp;</td>
@@ -30,9 +30,8 @@
 	<tr>
 		<th>$i18n.getString( "availableAttribute" )</th>
 		<th>$i18n.getString( "filter" )</th>
-		<th>$i18n.getString( "selectedAttribute" )
-			<input type='hidden' id='hasAttributes' name='hasAttributes' class="{validate:{required:true}}">
-		</th>
+		<td class='class-th'>$i18n.getString( "selectedAttribute" )<input type="hidden" id="attributeList" name="attributeList" />
+		</td>
 	</tr>
 	
 	<tr>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addCaseAggregation.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addCaseAggregation.vm	2014-05-30 08:04:25 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addCaseAggregation.vm	2014-08-06 15:20:54 +0000
@@ -24,7 +24,7 @@
     <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" class="{validate:{required:true,minlength:2}}">
+			<input type="text" id="name" name="name" >
 		</td>
     </tr>
     
@@ -45,7 +45,7 @@
 		<td>			
 			<input id="aggregationDataElementInput" name="aggregationDataElementInput" style='width:300px;'>
 			<a style='width:20px; margin-bottom:-5px;height:20px;' id='dataElementsButton' name='dataElementsButton'></a>
-			<input type='hidden' id="aggregationDataElementId" name="aggregationDataElementId" class="{validate:{required:true}}" >
+			<input type='hidden' id="aggregationDataElementId" name="aggregationDataElementId" >
 		</td>
 	</tr>
 	
@@ -89,7 +89,7 @@
 			<label for="deSumId">$i18n.getString( "data_element_for_sum_avg_min_max" ) <em title="$i18n.getString( "required" )" class="required">*</em></label>
 		</td>
 		<td>
-			<select id="deSumId" name="deSumId" disabled class="{validate:{required:true}}"></select>
+			<select id="deSumId" name="deSumId" disabled ></select>
 		</td>
 	</tr>
 	

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addProgramForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addProgramForm.vm	2014-08-01 06:56:13 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addProgramForm.vm	2014-08-06 15:20:54 +0000
@@ -3,57 +3,60 @@
 	
 	jQuery( document ).ready( function()
 	{	
-		validation( 'addProgramForm', function( form ){ 
-		enable('dateOfEnrollmentDescription');
-		enable('dateOfIncidentDescription');
-		form.submit();
-	}, function(){
-		
-		var selectedPropertyIds = jQuery( "#selectedPropertyIds" );
-		selectedPropertyIds.empty();
-		var personDisplayNames = jQuery( "#personDisplayNames" );
-		personDisplayNames.empty();
-		var compulsaryIdentifier = jQuery( "#compulsaryIdentifier" );
-		compulsaryIdentifier.empty();
-		var mandatorySelector = jQuery( "#mandatory" );
-		mandatorySelector.empty();
-		var allowFutureDateSelector = jQuery( "#allowFutureDate" );
-		allowFutureDateSelector.empty();
-		
-        if( getFieldValue('type') != 3 ){
-			
-			var isDisplayed = false;
-            jQuery("#selectedList").find("tr").each( function( i, item ){
-                selectedPropertyIds.append( "<option value='" + item.id + "' selected='true'>" + item.id + "</option>" );
-				var displayed = jQuery( item ).find( "input[name='displayed']:first");
-				var checked = displayed.attr('checked') ? true : false;
-				personDisplayNames.append( "<option value='" + checked + "' selected='true'>" + checked + "</option>" );
-				if( checked ){
-					isDisplayed = true
-				}
-				
-				// mandatory
-				var mandatory = jQuery( item ).find( "input[name='mandatory']:first");
-				checked = mandatory.attr('checked') ? true : false;
-				mandatorySelector.append( "<option value='" + checked + "' selected='true'>" + checked + "</option>" );
-				
-				// allowFutureDate
-				var allowFutureDate = jQuery( item ).find( "input[name='allowFutureDate']:first");
-				checked = allowFutureDate.attr('checked') ? true : false;
-				allowFutureDateSelector.append( "<option value='" + checked + "' selected='true'>" + checked + "</option>" );
-			});
-			if( jQuery("#selectedList").find("tr").length > 0 && isDisplayed ){
-				compulsaryIdentifier.append( "<option value='0' selected='true'></option>");
-			}
-		}
-		else{
-			compulsaryIdentifier.append( "<option value='0' selected='true'></option>");
-		}
-		
+		validation2( 'addProgramForm', function( form )
+		{
+			enable('dateOfEnrollmentDescription');
+			enable('dateOfIncidentDescription');
+			form.submit();
+		},{
+			'beforeValidateHandler' : function()
+			{
+				var selectedPropertyIds = jQuery( "#selectedPropertyIds" );
+				selectedPropertyIds.empty();
+				var personDisplayNames = jQuery( "#personDisplayNames" );
+				personDisplayNames.empty();
+				var compulsaryIdentifier = jQuery( "#compulsaryIdentifier" );
+				compulsaryIdentifier.empty();
+				var mandatorySelector = jQuery( "#mandatory" );
+				mandatorySelector.empty();
+				var allowFutureDateSelector = jQuery( "#allowFutureDate" );
+				allowFutureDateSelector.empty();
+				
+				if( getFieldValue('type') != 3 ){
+					
+					var isDisplayed = false;
+					jQuery("#selectedList").find("tr").each( function( i, item ){
+						selectedPropertyIds.append( "<option value='" + item.id + "' selected='true'>" + item.id + "</option>" );
+						var displayed = jQuery( item ).find( "input[name='displayed']:first");
+						var checked = displayed.attr('checked') ? true : false;
+						personDisplayNames.append( "<option value='" + checked + "' selected='true'>" + checked + "</option>" );
+						if( checked ){
+							isDisplayed = true
+						}
+						
+						// mandatory
+						var mandatory = jQuery( item ).find( "input[name='mandatory']:first");
+						checked = mandatory.attr('checked') ? true : false;
+						mandatorySelector.append( "<option value='" + checked + "' selected='true'>" + checked + "</option>" );
+						
+						// allowFutureDate
+						var allowFutureDate = jQuery( item ).find( "input[name='allowFutureDate']:first");
+						checked = allowFutureDate.attr('checked') ? true : false;
+						allowFutureDateSelector.append( "<option value='" + checked + "' selected='true'>" + checked + "</option>" );
+					});
+					if( jQuery("#selectedList").find("tr").length > 0 && isDisplayed ){
+						compulsaryIdentifier.append( "<option value='0' selected='true'></option>");
+					}
+				}
+				else{
+					compulsaryIdentifier.append( "<option value='0' selected='true'></option>");
+				}
+					},
+					'rules' : getValidationRules( "program" )
+				});
+		
+		checkValueIsExist( "name", "validateProgram.action" );
 	});
-	
-	checkValueIsExist( "name", "validateProgram.action" );
-    });
 </script>
 
 <h3>$i18n.getString( "create_new_program" ) #openHelp( "program_information" )</h3>
@@ -70,20 +73,20 @@
 	<tbody>
 		<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" class="{validate:{required:true,minlength:4}}"></td>
+			<td><input type="text" id="name" name="name" ></td>
 			<td></td>
 		</tr>	
 		
 		<tr>
 			<td><label for="description">$i18n.getString( "description" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
-			<td><input type="text" id="description" name="description" class="{validate:{required:true,minlength:4}}"></td>
+			<td><input type="text" id="description" name="description" ></td>
 			<td></td>
 		</tr>	
 		
 		<tr>
 			<td><label for="type">$i18n.getString( "type" ) </label></td>
 			<td>
-				<select id="type" name="type" onchange='programOnChange();' class="{validate:{required:true}}">
+				<select id="type" name="type" onchange='programOnChange();' >
 					<option value='1'>$i18n.getString('multiple_events_with_registration')</option>
 					<option value='2'>$i18n.getString('single_event_with_registration')</option>
 					<option value='3'>$i18n.getString('single_event_without_registration')</option>
@@ -94,7 +97,7 @@
 		<tr name='nonAnonymous' class='multiEvents'>
 			<td><label for="trackedEntityId">$i18n.getString( "tracked_entity" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
 			<td>
-				<select id='trackedEntityId' name='trackedEntityId' class="{validate:{required:true}}">
+				<select id='trackedEntityId' name='trackedEntityId' >
 					<option value=''>[$i18n.getString('please_select')]</option>
 					#foreach($trackedEntity in $trackedEntities)
 					<option value='$trackedEntity.id'>$trackedEntity.displayName</option>
@@ -146,13 +149,13 @@
 
 		<tr name='nonAnonymous'>
 			<td><label for="dateOfIncidentDescription">$i18n.getString( "date_of_incident_description" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
-			<td><input type="text" id="dateOfIncidentDescription" name="dateOfIncidentDescription" class="{validate:{required:true,minlength:2}}" value="$i18n.getString('incident_date')"></td>
+			<td><input type="text" id="dateOfIncidentDescription" name="dateOfIncidentDescription" value="$i18n.getString('incident_date')"></td>
 			<td></td>
 		</tr>
 		
 		<tr name='nonAnonymous'>
 			<td><label for="dateOfEnrollmentDescription">$i18n.getString( "date_of_enrollment_description" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
-			<td><input type="text" id="dateOfEnrollmentDescription" name="dateOfEnrollmentDescription" class="{validate:{required:true,minlength:4}}" value="$i18n.getString('enrollment_date')"></td>
+			<td><input type="text" id="dateOfEnrollmentDescription" name="dateOfEnrollmentDescription" value="$i18n.getString('enrollment_date')"></td>
 			<td></td>
 		</tr>
 			
@@ -230,13 +233,13 @@
 	  <tr>        
 		<th>$i18n.getString( "available_attributes" )</th>
 		<th></th>
-		<th>$i18n.getString( "select_attributes" )
+		<td class='class-th'>$i18n.getString( "select_attributes" )
 			<select style='display:none;' multiple id="selectedPropertyIds" name="selectedPropertyIds" ></select>
 			<select style='display:none;' multiple id="personDisplayNames" name="personDisplayNames" ></select>
 			<select style='display:none;' multiple id="mandatory" name="mandatory" ></select>
 			<select style='display:none;' multiple id="allowFutureDate" name="allowFutureDate" ></select>
 			<select id='compulsaryIdentifier' name="compulsaryIdentifier" multiple="multiple" class="hidden {validate:{required:true}}" title="$i18n.getString('please_select_at_least_attribute_for_displaying_in_list')"></select>
-		</th>
+		</td>
 	  </tr>
 	</thead>
 	<tr>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addProgramIndicator.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addProgramIndicator.vm	2014-05-30 08:04:25 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addProgramIndicator.vm	2014-08-06 15:20:54 +0000
@@ -1,8 +1,15 @@
 <script>
 jQuery( document ).ready( function()
 {
-	validation( 'programIndicatorForm', function(form){
+	validation2( 'programIndicatorForm', function( form )
+	{
 		form.submit();
+	},{
+		'beforeValidateHandler' : function()
+		{
+			
+		},
+		'rules' : getValidationRules( "programIndicator" )
 	});
 	
 	checkValueIsExist( "name", "validateProgramIndicator.action" );	
@@ -25,17 +32,17 @@
 	<tbody>
 		<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" class="{validate:{required:true,minlength:2}}"></td>
+			<td><input type="text" id="name" name="name" ></td>
 			<td></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" class="{validate:{required:true,minlength:2}}"></td>
+			<td><input type="text" id="shortName" name="shortName" ></td>
 			<td></td>
 		</tr>	
 		<tr>
 			<td><label for="code">$i18n.getString( "code" ) </label></td>
-			<td><input type="text" id="code" name="code" class="{validate:{minlength:2}}"></td>
+			<td><input type="text" id="code" name="code" ></td>
 			<td></td>
 		</tr>	
 		<tr>
@@ -46,7 +53,7 @@
 		<tr>
 			<td><label for="valueType">$i18n.getString( "value_type" ) </label></td>
 			<td>
-				<select id="valueType" name="valueType" onchange='programIndicatorOnChange();' class="{validate:{required:true}}">
+				<select id="valueType" name="valueType" onchange='programIndicatorOnChange();' >
 					<option value='int'>$i18n.getString('int')</option>
 					<option value='date'>$i18n.getString('date')</option>
 				</select>
@@ -56,7 +63,7 @@
 		<tr id='rootDateTR' style='display:none'>
 			<td><label for="rootDate">$i18n.getString( "date_for_calculating" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
 			<td>
-				<select id="rootDate" name="rootDate" class="{validate:{required:true}}">
+				<select id="rootDate" name="rootDate" >
 					<option value='incident_date'>$i18n.getString('incident_date')</option>
 					<option value='execution_date'>$i18n.getString('report_date')</option>
 					<option value='current_date'>$i18n.getString('current_date')</option>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addProgramReminder.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addProgramReminder.vm	2014-06-04 11:38:43 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addProgramReminder.vm	2014-08-06 15:20:54 +0000
@@ -3,11 +3,17 @@
 	{
 		showHideUserGroup();
 		
-		validation( 'addReminderForm', function( form ){
+		validation2( 'addReminderForm', function( form )
+		{
 			form.submit();
-		}, function(){
-			enable('messageType');
+		},{
+			'beforeValidateHandler' : function()
+			{
+				enable('messageType');
+			},
+			'rules' : getValidationRules( "trackedEntityInstanceReminder" )
 		});
+		
 		checkValueIsExist( "name", "validateReminder.action" );
 	});
 
@@ -28,7 +34,7 @@
     <tbody>
 		<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" class="{validate:{required:true,minlength:4}}"></td>
+			<td><input type="text" id="name" name="name"></td>
 			<td></td>
 		</tr>
 		<tr>
@@ -53,7 +59,6 @@
 		<tr>
 			<td><label for="days">$i18n.getString( "send_message" )</label></td>
 			<td><input type="text" id="days" name="days" 
-				class="{validate:{required:true,number:true}}"
 				onkeyup='setRealDays();' style="width:100px;" />
 				$i18n.getString('days')
 				<select id='time' name='time' onchange='setRealDays();' style="width:100px;">
@@ -67,7 +72,7 @@
 		<tr>
 			<td><label for="sendTo">$i18n.getString( "recipients" )</label></td>
 			<td>
-				<select type="text" id="sendTo" name="sendTo" class="{validate:{required:true,number:true}}" onchange="onchangeUserGroup(  )">
+				<select type="text" id="sendTo" name="sendTo" onchange="onchangeUserGroup()">
 					<option value="1" >$i18n.getString("tracked_entity_sms_only")</option>
 					<option value="3" >$i18n.getString("orgunit_phone_number_sms_only")</option>
 					<option value="2" >$i18n.getString("attribute_users")</option>
@@ -90,7 +95,7 @@
 		<tr>
 			<td><label for="messageType">$i18n.getString( "message_type" )</label></td>
 			<td>
-				<select type="text" id="messageType" name="messageType" disabled class="messageType {validate:{required:true,number:true}}" >
+				<select type="text" id="messageType" name="messageType" disabled class="messageType" >
 					<option value="1">$i18n.getString("direct_sms")</option>
 					<option value="2">$i18n.getString("message")</option>
 					<option value="3">$i18n.getString("both")</option>
@@ -115,7 +120,7 @@
 		</tr>
 		<tr>
 			<td><label for="optionSetId">$i18n.getString( "message" )</label></td>
-			<td><textarea onkeyup="getMessageLength()" id="templateMessage" name="templateMessage" class="templateMessage {validate:{required:true}}"></textarea></td>
+			<td><textarea onkeyup="getMessageLength()" id="templateMessage" name="templateMessage" ></textarea></td>
 		</tr>
 		<tr>
 			<td></td>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addProgramStageForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addProgramStageForm.vm	2014-07-29 17:14:27 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addProgramStageForm.vm	2014-08-06 15:20:54 +0000
@@ -21,18 +21,18 @@
 		
 	<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" class="{validate:{required:true,rangelength:[4,160]}}"/></td>
+		<td><input type="text" id="name" name="name" /></td>
 	</tr>	
 	
 	<tr>
 		<td><label for="description">$i18n.getString( "description" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
-		<td><input type="text" id="description" name="description" class="{validate:{required:true,minlength:4}}"/></td>
+		<td><input type="text" id="description" name="description" /></td>
 	</tr>
 	
 	#if( $program.type == 1 )
 	<tr>
 		<td><label for="minDaysFromStart">$i18n.getString( "scheduled_days_from_start" )</label></td>
-		<td><input type="text" id="minDaysFromStart" name="minDaysFromStart" value="0" class="{validate:{number:true,min:0}}"/></td>
+		<td><input type="text" id="minDaysFromStart" name="minDaysFromStart" value="0" /></td>
 	</tr>
 	
 	<tr><th colspan="2">$i18n.getString( "repeatable_program_stage_details" )</th></tr>
@@ -49,7 +49,7 @@
 	
 	<tr>
 		<td><label for="standardInterval">$i18n.getString( "standard_interval_days" )</label></td>
-		<td><input type="text" id="standardInterval" name="standardInterval" class="{validate:{number:true}}" disabled /></td>
+		<td><input type="text" id="standardInterval" name="standardInterval" disabled /></td>
 	</tr>
 	
 	#end
@@ -89,7 +89,7 @@
 		<tr>
 			<td><label for="reportDateToUse">$i18n.getString( "report_date_to_use" )</label></td>
 			<td>
-				<select id="reportDateToUse" name="reportDateToUse" class="{validate:{required:true}}" disabled>
+				<select id="reportDateToUse" name="reportDateToUse" disabled>
 					<option value=''>[$i18n.getString('please_select')]</option>
 					<option value='dateOfIncident'>$i18n.getString("date_of_incident")</option>
 					<option value='enrollmentDate'>$i18n.getString("date_of_enrollment")</option>
@@ -137,7 +137,7 @@
 	
 	<tr>
 		<td><label for="reportDateDescription">$i18n.getString( "report_date_description" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
-		<td><input type="text" id="reportDateDescription" name="reportDateDescription" class="{validate:{required:true}}" value="$i18n.getString( 'report_date' )" /></td>
+		<td><input type="text" id="reportDateDescription" name="reportDateDescription" value="$i18n.getString( 'report_date' )" /></td>
 	</tr>
 	
 	<tr><td>&nbsp;</td><td>&nbsp;</td></tr>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addProgramStageReminder.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addProgramStageReminder.vm	2014-06-04 11:14:18 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addProgramStageReminder.vm	2014-08-06 15:20:54 +0000
@@ -3,11 +3,17 @@
 	{
 		showHideUserGroup();
 		
-		validation( 'addReminderForm', function( form ){
+		validation2( 'addReminderForm', function( form )
+		{
 			form.submit();
-		}, function(){
-			enable('messageType');
+		},{
+			'beforeValidateHandler' : function()
+			{
+				enable('messageType');
+			},
+			'rules' : getValidationRules( "trackedEntityInstanceReminder" )
 		});
+		
 		checkValueIsExist( "name", "validateReminder.action" );
 	});
 
@@ -28,7 +34,7 @@
     <tbody>
 		<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" class="{validate:{required:true,minlength:4}}"></td>
+			<td><input type="text" id="name" name="name" ></td>
 			<td></td>
 		</tr>
 		<tr>
@@ -43,7 +49,6 @@
 		<tr>
 			<td><label for="days">$i18n.getString( "send_message" )</label></td>
 			<td><input type="text" id="days" name="days" 
-				class="{validate:{required:true,number:true}}"
 				onkeyup='setRealDays();' style="width:100px;"/>
 				$i18n.getString('days')
 				<select id='time' name='time' onchange='setRealDays();' style="width:100px;">
@@ -57,7 +62,7 @@
 		<tr>
 			<td><label for="sendTo">$i18n.getString( "recipients" )</label></td>
 			<td>
-				<select type="text" id="sendTo" name="sendTo" class="{validate:{required:true,number:true}}" onchange="onchangeUserGroup(  )">
+				<select type="text" id="sendTo" name="sendTo" onchange="onchangeUserGroup(  )">
 					<option value="1" >$i18n.getString("tracked_entity_sms_only")</option>
 					<option value="3" >$i18n.getString("orgunit_phone_number_sms_only")</option>
 					<option value="2" >$i18n.getString("attribute_users")</option>
@@ -69,7 +74,7 @@
 		<tr>
 			<td><label for="userGroup">$i18n.getString( "user_group" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
 			<td>
-				<select type="text" id="userGroup" name="userGroup" disabled class="{validate:{required:true}}">
+				<select type="text" id="userGroup" name="userGroup" disabled >
 					<option value="">[$i18n.getString("please_select")]</option>
 					#foreach($eachGroup in $userGroups)
 						<option value="$eachGroup.id">$i18n.getString($eachGroup.name)</option>
@@ -80,7 +85,7 @@
 		<tr>
 			<td><label for="messageType">$i18n.getString( "message_type" )</label></td>
 			<td>
-				<select type="text" id="messageType" name="messageType" disabled class="messageType {validate:{required:true,number:true}}" >
+				<select type="text" id="messageType" name="messageType" disabled class="messageType" >
 					<option value="1">$i18n.getString("direct_sms")</option>
 					<option value="2">$i18n.getString("message")</option>
 					<option value="3">$i18n.getString("both")</option>
@@ -104,7 +109,7 @@
 		</tr>
 		<tr>
 			<td><label for="optionSetId">$i18n.getString( "message" )</label></td>
-			<td><textarea onkeyup="getMessageLength()" id="templateMessage" name="templateMessage" class="templateMessage {validate:{required:true}}"></textarea></td>
+			<td><textarea onkeyup="getMessageLength()" id="templateMessage" name="templateMessage" class="templateMessage"></textarea></td>
 		</tr>
 		<tr>
 			<td></td>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addProgramStageSectionForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addProgramStageSectionForm.vm	2014-04-26 12:14:51 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addProgramStageSectionForm.vm	2014-08-06 15:20:54 +0000
@@ -1,14 +1,20 @@
 <script>
 jQuery( document ).ready( function()
 {
-	validation( 'programStageSectionForm', function(form){
+	validation2( 'programStageSectionForm', function( form )
+	{
 		form.submit();
-	}, function(){
-		selectAllById('dataElementIds');
-		if(jQuery("#dataElementIds option").length > 0 ){
-			setFieldValue('hasDataElement', 'true');
-		}
+	},{
+		'beforeValidateHandler' : function()
+		{
+			selectAllById('dataElementIds');
+			if(jQuery("#dataElementIds option").length > 0 ){
+				setFieldValue('dataElementList', 'true');
+			}
+		},
+		'rules' : getValidationRules( "programStageSection" )
 	});
+	
 	checkValueIsExist( "name", "validateProgramStageSection.action",{programStageId:getFieldValue('programStageId')});
 	byId('name').focus();
 });
@@ -28,7 +34,7 @@
 	<tbody>
 		<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" class="{validate:{required:true,rangelength:[2,160]}}"/></td>
+			<td><input type="text" id="name" name="name" /></td>
 		</tr>
 	</tbody>
 </table>
@@ -43,10 +49,10 @@
       <tr>        
         <th>$i18n.getString( "available_data_elements" )</th>
         <th></th>
-        <th>
+        <td class="class-th">
 			$i18n.getString( "selected_data_elements" )
-			<input type='hidden' id='hasDataElement' name='hasDataElement' class="{validate:{required:true}}">
-		</th>
+			<input type='hidden' id='dataElementList' name='dataElementList' >
+		</td>
       </tr>
     </thead>
   

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addRelationshipTypeForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addRelationshipTypeForm.vm	2014-04-26 12:14:51 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addRelationshipTypeForm.vm	2014-08-06 15:20:54 +0000
@@ -14,17 +14,17 @@
 	<tbody>
 		<tr>
 			<td><label for="aIsToB">$i18n.getString( "a_is_to_b" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
-			<td><input type="text" id="aIsToB" name="aIsToB" class="{validate:{required:true,rangelength:[2,160]}}"/></td>
+			<td><input type="text" id="aIsToB" name="aIsToB" /></td>
 		</tr>   
 		
 		<tr>
 			<td><label for="bIsToA">$i18n.getString( "b_is_to_a" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
-			<td><input type="text" id="bIsToA" name="bIsToA" class="{validate:{required:true,rangelength:[2,160]}}"/></td>
+			<td><input type="text" id="bIsToA" name="bIsToA" /></td>
 		</tr>   
 		
 		<tr>
 			<td><label for="name">$i18n.getString( "description" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
-			<td><input type="text" id="name" name="name" class="{validate:{required:true,rangelength:[2,160]}}"/></td>
+			<td><input type="text" id="name" name="name" /></td>
 		</tr>   
     </tbody>
 	

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addSingleProgramValidationForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addSingleProgramValidationForm.vm	2014-04-29 11:29:41 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addSingleProgramValidationForm.vm	2014-08-06 15:20:54 +0000
@@ -17,13 +17,13 @@
 	<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' class="{validate:{required:true,minlength:4}}" >
+			<input type="text" id='name' name='name' >
 		</td>
 	</tr>
 	<tr>
 		<td><label for="operator">$encoder.htmlEncode( $i18n.getString( "operator" ) ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
 		<td>
-			<select id="operator" name="operator" class="{validate:{required:true}}">
+			<select id="operator" name="operator" >
 				<option value="">[ $i18n.getString( "please_select" ) ]</option>
 				<option value="equal_to">$encoder.htmlEncode( $i18n.getString( "equal_to" ) )</option>
 				<option value="not_equal_to">$encoder.htmlEncode( $i18n.getString( "not_equal_to" ) )</option>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addTrackedEntity.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addTrackedEntity.vm	2014-04-26 12:14:51 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addTrackedEntity.vm	2014-08-06 15:20:54 +0000
@@ -1,8 +1,11 @@
 <script>
 	jQuery(document).ready(	function(){
-		validation( 'addTrackedEntityForm', function(form){
-				form.submit();
-		}); 
+		validation2( 'addTrackedEntityForm', function( form )
+		{
+			form.submit();
+		},{
+			'rules' : getValidationRules( "trackedEntity" )
+		});
 		
 		checkValueIsExist( "name", "validateTrackedEntity.action");
 	});	
@@ -19,13 +22,13 @@
     <tbody>
 		<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" class="{validate:{required:true,rangelength:[2,160]}}"/></td>
+			<td><input type="text" id="name" name="name" "/></td>
 			<td></td>
 		</tr>   
 		
 		<tr>
 			<td><label for="description">$i18n.getString( "description" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
-			<td><input type="text" id="description" name="description" class="{validate:{required:true,minlength:2}}"/></td>
+			<td><input type="text" id="description" name="description" /></td>
 			<td></td>
 		</tr>
     </tbody>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addValidationCriteria.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addValidationCriteria.vm	2014-07-27 15:02:58 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addValidationCriteria.vm	2014-08-06 15:20:54 +0000
@@ -9,11 +9,11 @@
 	<tr><th colspan="3">$i18n.getString('validation_criteria_details')</th></tr>
     <tr>
 		<td><label for="name">$i18n.getString('name') <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
-		<td colspan="2"><input type='text' id='name' name='name' class="{validate:{required:true,rangelength:[2,160]}}"/></td>
+		<td colspan="2"><input type='text' id='name' name='name' /></td>
     </tr>
     <tr>
 		<td><label for="description">$i18n.getString('description') <em title="$i18n.getString( 'required' )" class="required">*</em></label></label></td>
-		<td colspan="2"><input type='text' id='description' name='description' class="{validate:{required:true,rangelength:[2,160]}}"></td>
+		<td colspan="2"><input type='text' id='description' name='description' ></td>
 	</tr>
     <tr>
 		<td><label for="property">$i18n.getString('criteria')<em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
@@ -42,7 +42,7 @@
 					</select>
 				</td>
 				<td id='valueTD'>
-					<input type='text' id='value' name='value' class="{validate:{required:true}}" style="width:130px"/>
+					<input type='text' id='value' name='value' style="width:130px"/>
 				</td>
 			</tr>
 		</table>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/caseAggregationForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/caseAggregationForm.vm	2014-05-12 14:37:40 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/caseAggregationForm.vm	2014-08-06 15:20:54 +0000
@@ -162,7 +162,9 @@
 		<td>
 			<fieldset>
 				<legend>$i18n.getString( "condition" )</legend>
-				<textarea id="aggregationCondition" name="aggregationCondition" onkeyup='getConditionDescription();' maxlength="1000">$!caseAggregation.aggregationExpression</textarea>
+				<table><tr><td>
+					<textarea id="aggregationCondition" name="aggregationCondition" onkeyup='getConditionDescription();' maxlength="1000">$!caseAggregation.aggregationExpression</textarea>
+				</td></tr></table>
 			</fieldset>
 		</td>
 	</tr>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/expressionBuilderForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/expressionBuilderForm.vm	2012-12-07 13:00:15 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/expressionBuilderForm.vm	2014-08-06 15:20:54 +0000
@@ -19,7 +19,7 @@
 			</tr>
 			<tr>
 				<td>
-					<input type="text" id="description" name="description" class="{validate:{required:true}}"/><br>
+					<input type="text" id="description" name="description" /><br>
 					<span id="exp-descriptionInfo" generated="true" class="error"></span>
 				</td>
 				<td>
@@ -40,7 +40,7 @@
 			</tr>
 			<tr>
 				<td>
-					<textarea id="expression" name="expression" style="width:316px;height:138px" wrap="virtual" onchange="getExpressionText()" class="{validate:{required:true}}"></textarea><br/>
+					<textarea id="expression" name="expression" style="width:316px;height:138px" wrap="virtual" onchange="getExpressionText()" ></textarea><br/>
 					<span id="exp-expressionInfo" generated="true" class="error"></span>
 				</td>
 				<td valign="top">

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/addAttributeForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/addAttributeForm.js	2014-04-18 08:58:14 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/addAttributeForm.js	2014-08-06 15:20:54 +0000
@@ -1,8 +1,11 @@
 jQuery(document).ready(	function(){
-	validation( 'addAttributeForm', function(form){
+	validation2( 'addAttributeForm', function( form )
+	{
 		form.submit();
-	})
-
+	}, {
+		'rules' : getValidationRules( "trackedEntityAttribute" )
+	} );
+		
 	checkValueIsExist( "name", "validateAttribute.action");
 	checkValueIsExist( "shortName", "validateAttribute.action");
 	checkValueIsExist( "code", "validateAttribute.action");

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/addAttributeGroupForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/addAttributeGroupForm.js	2014-02-07 20:25:49 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/addAttributeGroupForm.js	2014-08-06 15:20:54 +0000
@@ -2,6 +2,20 @@
 		
 		jQuery('name').focus();
 		
+		validation2( 'addAttributeGroupForm', function( form )
+		{
+			form.submit();
+		},{
+			'beforeValidateHandler' : function()
+			{
+				selectAllById('selectedAttributes');
+				if(jQuery("#selectedAttributes option").length > 0 ){
+					setFieldValue('attributeList', 'true');
+				}
+			},
+			'rules' : getValidationRules( "trackedEntityAttributeGroup" )
+		});
+		
 		jQuery("#availableAttributes").dhisAjaxSelect({
 			source: 'getAttributeWithoutGroup.action',
 			iterator: 'attributes',
@@ -15,15 +29,5 @@
 			}
 		});
 		
-		
-		validation( 'addAttributeGroupForm', function(form){
-			form.submit();
-		}, function(){
-			selectAllById('selectedAttributes');
-			if(jQuery("#selectedAttributes option").length > 0 ){
-				setFieldValue('hasAttributes', 'true');
-			}
-		});
-		
 		checkValueIsExist( "name", "validateAttributeGroup.action" );
 	});		
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/addCaseAggregationForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/addCaseAggregationForm.js	2014-02-07 20:25:49 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/addCaseAggregationForm.js	2014-08-06 15:20:54 +0000
@@ -1,6 +1,10 @@
 jQuery(document).ready(	function(){
-	validation( 'addCaseAggregationForm', function(form){
+	
+	validation2( 'addCaseAggregationForm', function( form )
+	{
 		form.submit();
+	},{
+		'rules' : getValidationRules( "caseAggregation" )
 	});
 	
 	jQuery("#tabs").tabs();

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/addProgramStageForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/addProgramStageForm.js	2014-07-29 17:14:27 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/addProgramStageForm.js	2014-08-06 15:20:54 +0000
@@ -1,83 +1,88 @@
 var duplicate = false;
 jQuery( document ).ready( function()
 {
-	validation( 'addProgramStageForm', function( form ){ 
+	validation2( 'addProgramStageForm', function( form )
+	{
 		form.submit();
-	}, function(){
-		selectAllById('selectedIndicators');
-		
-		var selectedDataElementsValidator = jQuery( "#selectedDataElementsValidator" );
-		selectedDataElementsValidator.empty();
-		
-		var compulsories = jQuery( "#compulsories" );
-		compulsories.empty();
-		
-		var displayInReports = jQuery( "#displayInReports" );
-		displayInReports.empty();
-		
-		var daysAllowedSendMessages = jQuery( "#daysAllowedSendMessages" );
-		daysAllowedSendMessages.empty();
-		
-		var allowFutureDates = jQuery( "#allowFutureDates" );
-		allowFutureDates.empty();
-		
-		var templateMessages = jQuery( "#templateMessages" );
-		templateMessages.empty();
-		
-		var allowProvidedElsewhere = jQuery( "#allowProvidedElsewhere" );
-		allowProvidedElsewhere.empty();
-		
-		var sendTo = jQuery( "#sendTo" );
-		sendTo.empty();
-		
-		var whenToSend = jQuery( "#whenToSend" );
-		whenToSend.empty();
-		
-		var userGroup = jQuery( "#userGroup" );
-		userGroup.empty();	
-		
-		var messageType = jQuery( "#messageType" );
-		messageType.empty();
+	},{
+		'beforeValidateHandler' : function()
+		{
+			selectAllById('selectedIndicators');
+		
+			var selectedDataElementsValidator = jQuery( "#selectedDataElementsValidator" );
+			selectedDataElementsValidator.empty();
+			
+			var compulsories = jQuery( "#compulsories" );
+			compulsories.empty();
+			
+			var displayInReports = jQuery( "#displayInReports" );
+			displayInReports.empty();
+			
+			var daysAllowedSendMessages = jQuery( "#daysAllowedSendMessages" );
+			daysAllowedSendMessages.empty();
+			
+			var allowFutureDates = jQuery( "#allowFutureDates" );
+			allowFutureDates.empty();
+			
+			var templateMessages = jQuery( "#templateMessages" );
+			templateMessages.empty();
+			
+			var allowProvidedElsewhere = jQuery( "#allowProvidedElsewhere" );
+			allowProvidedElsewhere.empty();
+			
+			var sendTo = jQuery( "#sendTo" );
+			sendTo.empty();
+			
+			var whenToSend = jQuery( "#whenToSend" );
+			whenToSend.empty();
+			
+			var userGroup = jQuery( "#userGroup" );
+			userGroup.empty();	
+			
+			var messageType = jQuery( "#messageType" );
+			messageType.empty();
 
-		jQuery("#selectedList").find("tr").each( function( i, item ){ 
-			
-			selectedDataElementsValidator.append( "<option value='" + item.id + "' selected='true'>" + item.id + "</option>" );
-			
-			var compulsory = jQuery( item ).find( "input[name='compulsory']:first");
-			var checked = compulsory.attr('checked') ? true : false;
-			compulsories.append( "<option value='" + checked + "' selected='true'>" + checked + "</option>" );
-			
-			var allowProvided = jQuery( item ).find( "input[name='allowProvided']:first");
-			checked = allowProvided.attr('checked') ? true : false;
-			allowProvidedElsewhere.append( "<option value='" + checked + "' selected='true'>" + checked + "</option>" );
-			
-			var displayInReport = jQuery( item ).find( "input[name='displayInReport']:first");
-			checked = displayInReport.attr('checked') ? true : false;
-			displayInReports.append( "<option value='" + checked + "' selected='true'><" + checked + "/option>" );
-		
-			var allowFutureDate = jQuery( item ).find( "input[name='allowFutureDate']:first");
-			checked = allowFutureDate.attr('checked') ? true : false;
-			allowFutureDates.append( "<option value='" + checked + "' selected='true'>" + checked + "</option>" );
-		});
-		jQuery(".daysAllowedSendMessage").each( function( i, item ){ 
-			var days = (jQuery(item).attr('realvalue')==undefined) ? 0 : jQuery(item).attr('realvalue');
-			daysAllowedSendMessages.append( "<option value='" + days + "' selected='true'>" + days + "</option>" );
-		});
-		jQuery(".templateMessage").each( function( i, item ){ 
-			templateMessages.append( "<option value='" + item.value + "' selected='true'>" + item.value + "</option>" );
-		});
-		jQuery(".sendTo").each( function( i, item ){ 
-			sendTo.append( "<option value='" + item.value + "' selected='true'>" + item.value + "</option>" );
-		});
-		jQuery(".whenToSend").each( function( i, item ){ 
-			whenToSend.append( "<option value='" + item.value + "' selected='true'>" + item.value + "</option>" );
-		});
-		jQuery(".messageType").each( function( i, item ){ 
-			messageType.append( "<option value='" + item.value + "' selected='true'>" + item.value + "</option>" );
-		});
-		jQuery(".userGroup").each( function( i, item ){ 
-			userGroup.append( "<option value='" + item.value + "' selected='true'>" + item.value + "</option>" );
-		});
+			jQuery("#selectedList").find("tr").each( function( i, item ){ 
+				
+				selectedDataElementsValidator.append( "<option value='" + item.id + "' selected='true'>" + item.id + "</option>" );
+				
+				var compulsory = jQuery( item ).find( "input[name='compulsory']:first");
+				var checked = compulsory.attr('checked') ? true : false;
+				compulsories.append( "<option value='" + checked + "' selected='true'>" + checked + "</option>" );
+				
+				var allowProvided = jQuery( item ).find( "input[name='allowProvided']:first");
+				checked = allowProvided.attr('checked') ? true : false;
+				allowProvidedElsewhere.append( "<option value='" + checked + "' selected='true'>" + checked + "</option>" );
+				
+				var displayInReport = jQuery( item ).find( "input[name='displayInReport']:first");
+				checked = displayInReport.attr('checked') ? true : false;
+				displayInReports.append( "<option value='" + checked + "' selected='true'><" + checked + "/option>" );
+			
+				var allowFutureDate = jQuery( item ).find( "input[name='allowFutureDate']:first");
+				checked = allowFutureDate.attr('checked') ? true : false;
+				allowFutureDates.append( "<option value='" + checked + "' selected='true'>" + checked + "</option>" );
+			});
+			jQuery(".daysAllowedSendMessage").each( function( i, item ){ 
+				var days = (jQuery(item).attr('realvalue')==undefined) ? 0 : jQuery(item).attr('realvalue');
+				daysAllowedSendMessages.append( "<option value='" + days + "' selected='true'>" + days + "</option>" );
+			});
+			jQuery(".templateMessage").each( function( i, item ){ 
+				templateMessages.append( "<option value='" + item.value + "' selected='true'>" + item.value + "</option>" );
+			});
+			jQuery(".sendTo").each( function( i, item ){ 
+				sendTo.append( "<option value='" + item.value + "' selected='true'>" + item.value + "</option>" );
+			});
+			jQuery(".whenToSend").each( function( i, item ){ 
+				whenToSend.append( "<option value='" + item.value + "' selected='true'>" + item.value + "</option>" );
+			});
+			jQuery(".messageType").each( function( i, item ){ 
+				messageType.append( "<option value='" + item.value + "' selected='true'>" + item.value + "</option>" );
+			});
+			jQuery(".userGroup").each( function( i, item ){ 
+				userGroup.append( "<option value='" + item.value + "' selected='true'>" + item.value + "</option>" );
+			});
+		},
+		'rules' : getValidationRules( "programStage" )
 	});
 	
 	jQuery("#availableList").dhisAjaxSelect({

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/addRelationshipTypeForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/addRelationshipTypeForm.js	2012-03-19 09:35:42 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/addRelationshipTypeForm.js	2014-08-06 15:20:54 +0000
@@ -1,8 +1,12 @@
 jQuery(document).ready(	function(){
 
 	jQuery('aIsToB').focus();
-		
-	validation( 'addRelationshipTypeForm', function(form){
+	
+	validation2( 'addRelationshipTypeForm', function( form )
+	{
 		validateAddRelationshipType();
-	}); 
+	},{
+		'rules' : getValidationRules( "relationshipType" )
+	});
+	
 });	
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/addValidationCriteria.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/addValidationCriteria.js	2012-03-19 09:35:42 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/addValidationCriteria.js	2014-08-06 15:20:54 +0000
@@ -1,9 +1,12 @@
 jQuery(document).ready(
 	function()
 	{
-		validation( 'validationCriteriaForm', function( form ){
-			form.submit();			
-		});
-				
+		validation2( 'validationCriteriaForm', function( form )
+		{
+			form.submit();
+		},{
+			'rules' : getValidationRules( "validationCriteria" )
+		});	
+			
 		checkValueIsExist( "name", "validateValidationCriteria.action");
 });	
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/programReminder.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/programReminder.js	2014-06-13 10:58:05 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/programReminder.js	2014-08-06 15:20:54 +0000
@@ -128,17 +128,19 @@
   getMessageLength();
 }
 
-function whenToSendOnChange(  ) {
+function whenToSendOnChange() {
   var whenToSend = getFieldValue('whenToSend' );
   if( whenToSend == "" ) {
     enable('dateToCompare');
     enable('daysAllowedSendMessage' );
     enable('time');
+    enable('days');
   }
   else {
     disable('dateToCompare');
     disable('daysAllowedSendMessage');
     disable('time');
+    disable('days');
   }
 }
 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/programStageReminder.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/programStageReminder.js	2014-06-13 10:58:05 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/programStageReminder.js	2014-08-06 15:20:54 +0000
@@ -133,11 +133,13 @@
     enable('dateToCompare');
     enable('daysAllowedSendMessage' );
     enable('time');
+    enable('days');
   }
   else {
     disable('dateToCompare');
     disable('daysAllowedSendMessage');
     disable('time');
+    disable('days');
   }
 }
 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/programValidation.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/programValidation.js	2014-06-13 10:58:05 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/programValidation.js	2014-08-06 15:20:54 +0000
@@ -2,14 +2,18 @@
 var COLOR_WHITE = '#ffffff'
 
 jQuery(document).ready(function() {
-  validation('programValidationForm', function( form ) {
-    form.submit();
-  });
+ 
+    validation2( 'programValidationForm', function( form )
+	{
+		form.submit();
+	},{
+		'rules' : getValidationRules( "programValidation" )
+	});
 
-  dhis2.contextmenu.makeContextMenu({
-    menuId: 'contextMenu',
-    menuItemActiveClass: 'contextMenuItemActive'
-  });
+	dhis2.contextmenu.makeContextMenu({
+		menuId: 'contextMenu',
+		menuItemActiveClass: 'contextMenuItemActive'
+    });
 });
 
 // -----------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/updateAttributeForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/updateAttributeForm.js	2014-04-18 08:58:14 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/updateAttributeForm.js	2014-08-06 15:20:54 +0000
@@ -1,7 +1,11 @@
 jQuery(document).ready(	function(){
-	validation( 'updateAttributeForm', function(form){
+	validation2( 'updateAttributeForm', function( form )
+	{
 		form.submit();
-	});
+	}, {
+		'rules' : getValidationRules( "trackedEntityAttribute" )
+	} );
+		
 	
 	checkValueIsExist( "name", "validateAttribute.action", {id:getFieldValue('id')});
 	checkValueIsExist( "shortName", "validateAttribute.action", {id:getFieldValue('id')});

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/updateAttributeGroupForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/updateAttributeGroupForm.js	2014-02-07 20:25:49 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/updateAttributeGroupForm.js	2014-08-06 15:20:54 +0000
@@ -2,15 +2,20 @@
 	
 	jQuery('name').focus();
 
-	validation( 'updateAttributeGroupForm', function(form){
+	validation2( 'updateAttributeGroupForm', function( form )
+		{
 			form.submit();
-		}, function(){
-			selectAllById('selectedAttributes');
-			if(jQuery("#selectedAttributes option").length > 0 ){
-				setFieldValue('hasAttributes', 'true');
-			}
+		},{
+			'beforeValidateHandler' : function()
+			{
+				selectAllById('selectedAttributes');
+				if(jQuery("#selectedAttributes option").length > 0 ){
+					setFieldValue('attributeList', 'true');
+				}
+			},
+			'rules' : getValidationRules( "trackedEntityAttributeGroup" )
 		});
-
+		
 	checkValueIsExist( "name", "validateAttributeGroup.action", {id:getFieldValue('id')});
 	
 	jQuery("#availableAttributes").dhisAjaxSelect({

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/updateCaseAggregationForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/updateCaseAggregationForm.js	2012-06-04 04:06:04 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/updateCaseAggregationForm.js	2014-08-06 15:20:54 +0000
@@ -1,8 +1,11 @@
 jQuery(document).ready(	function(){
 	
-	validation( 'updateCaseAggregationForm', function(form){
+	validation2( 'updateCaseAggregationForm', function( form )
+	{
 		form.submit();
-	}); 
+	},{
+		'rules' : getValidationRules( "caseAggregation" )
+	});
 	
 	checkValueIsExist( "aggregationDataElementId", "validateCaseAggregation.action", {id:getFieldValue('id')});
 	

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/updateProgramStageForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/updateProgramStageForm.js	2014-07-29 17:14:27 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/updateProgramStageForm.js	2014-08-06 15:20:54 +0000
@@ -2,83 +2,89 @@
 jQuery( document ).ready( function()
 {
 	showHideUserGroup();
-	validation( 'updateProgramStageForm', function( form ){ 
+	
+	validation2( 'updateProgramStageForm', function( form )
+	{
 		form.submit();
-	}, function(){
-		selectAllById('selectedIndicators');
-		
-		var selectedDataElementsValidator = jQuery( "#selectedDataElementsValidator" );
-		selectedDataElementsValidator.empty();
-		
-		var compulsories = jQuery( "#compulsories" );
-		compulsories.empty();
-		
-		var displayInReports = jQuery( "#displayInReports" );
-		displayInReports.empty();
-		
-		var allowFutureDates = jQuery( "#allowFutureDates" );
-		allowFutureDates.empty();
-		
-		var daysAllowedSendMessages = jQuery( "#daysAllowedSendMessages" );
-		daysAllowedSendMessages.empty();
-		
-		var templateMessages = jQuery( "#templateMessages" );
-		templateMessages.empty();
-		
-		var allowProvidedElsewhere = jQuery( "#allowProvidedElsewhere" );
-		allowProvidedElsewhere.empty();
-		
-		var sendTo = jQuery( "#sendTo" );
-		sendTo.empty();
-		
-		var whenToSend = jQuery( "#whenToSend" );
-		whenToSend.empty();
-		
-		var userGroup = jQuery( "#userGroup" );
-		userGroup.empty();
-		
-		var messageType = jQuery( "#messageType" );
-		messageType.empty();
+	},{
+		'beforeValidateHandler' : function()
+		{
+			selectAllById('selectedIndicators');
+		
+			var selectedDataElementsValidator = jQuery( "#selectedDataElementsValidator" );
+			selectedDataElementsValidator.empty();
+			
+			var compulsories = jQuery( "#compulsories" );
+			compulsories.empty();
+			
+			var displayInReports = jQuery( "#displayInReports" );
+			displayInReports.empty();
+			
+			var daysAllowedSendMessages = jQuery( "#daysAllowedSendMessages" );
+			daysAllowedSendMessages.empty();
+			
+			var allowFutureDates = jQuery( "#allowFutureDates" );
+			allowFutureDates.empty();
+			
+			var templateMessages = jQuery( "#templateMessages" );
+			templateMessages.empty();
+			
+			var allowProvidedElsewhere = jQuery( "#allowProvidedElsewhere" );
+			allowProvidedElsewhere.empty();
+			
+			var sendTo = jQuery( "#sendTo" );
+			sendTo.empty();
+			
+			var whenToSend = jQuery( "#whenToSend" );
+			whenToSend.empty();
+			
+			var userGroup = jQuery( "#userGroup" );
+			userGroup.empty();	
+			
+			var messageType = jQuery( "#messageType" );
+			messageType.empty();
 
-		jQuery("#selectedList").find("tr").each( function( i, item ){ 
-			
-			selectedDataElementsValidator.append( "<option value='" + item.id + "' selected='true'>" + item.id + "</option>" );
-			
-			var compulsory = jQuery( item ).find( "input[name='compulsory']:first");
-			var checked = compulsory.attr('checked') ? true : false;
-			compulsories.append( "<option value='" + checked + "' selected='true'>" + checked + "</option>" );
-			
-			var allowProvided = jQuery( item ).find( "input[name='allowProvided']:first");
-			checked = allowProvided.attr('checked') ? true : false;
-			allowProvidedElsewhere.append( "<option value='" + checked + "' selected='true'>" + checked + "</option>" );
-			
-			var displayInReport = jQuery( item ).find( "input[name='displayInReport']:first");
-			checked = displayInReport.attr('checked') ? true : false;
-			displayInReports.append( "<option value='" + checked + "' selected='true'>" + checked + "</option>" );
-		
-			var allowFutureDate = jQuery( item ).find( "input[name='allowFutureDate']:first");
-			checked = allowFutureDate.attr('checked') ? true : false;
-			allowFutureDates.append( "<option value='" + checked + "' selected='true'>" + checked + "</option>" );
-		});
-		jQuery(".daysAllowedSendMessage").each( function( i, item ){ 
-			var days = (jQuery(item).attr('realvalue')==undefined) ? 0 : jQuery(item).attr('realvalue');
-			daysAllowedSendMessages.append( "<option value='" + days + "' selected='true'>" + days + "</option>" );
-		});
-		jQuery(".templateMessage").each( function( i, item ){ 
-			templateMessages.append( "<option value='" + item.value + "' selected='true'>" + item.value + "</option>" );
-		});
-		jQuery(".sendTo").each( function( i, item ){ 
-			sendTo.append( "<option value='" + item.value + "' selected='true'>" + item.value + "</option>" );
-		});
-		jQuery(".whenToSend").each( function( i, item ){ 
-			whenToSend.append( "<option value='" + item.value + "' selected='true'>" + item.value + "</option>" );
-		});
-		jQuery(".messageType").each( function( i, item ){ 
-			messageType.append( "<option value='" + item.value + "' selected='true'>" + item.value + "</option>" );
-		});
-		jQuery(".userGroup").each( function( i, item ){ 
-			userGroup.append( "<option value='" + item.value + "' selected='true'>" + item.value + "</option>" );
-		});
+			jQuery("#selectedList").find("tr").each( function( i, item ){ 
+				
+				selectedDataElementsValidator.append( "<option value='" + item.id + "' selected='true'>" + item.id + "</option>" );
+				
+				var compulsory = jQuery( item ).find( "input[name='compulsory']:first");
+				var checked = compulsory.attr('checked') ? true : false;
+				compulsories.append( "<option value='" + checked + "' selected='true'>" + checked + "</option>" );
+				
+				var allowProvided = jQuery( item ).find( "input[name='allowProvided']:first");
+				checked = allowProvided.attr('checked') ? true : false;
+				allowProvidedElsewhere.append( "<option value='" + checked + "' selected='true'>" + checked + "</option>" );
+				
+				var displayInReport = jQuery( item ).find( "input[name='displayInReport']:first");
+				checked = displayInReport.attr('checked') ? true : false;
+				displayInReports.append( "<option value='" + checked + "' selected='true'><" + checked + "/option>" );
+			
+				var allowFutureDate = jQuery( item ).find( "input[name='allowFutureDate']:first");
+				checked = allowFutureDate.attr('checked') ? true : false;
+				allowFutureDates.append( "<option value='" + checked + "' selected='true'>" + checked + "</option>" );
+			});
+			jQuery(".daysAllowedSendMessage").each( function( i, item ){ 
+				var days = (jQuery(item).attr('realvalue')==undefined) ? 0 : jQuery(item).attr('realvalue');
+				daysAllowedSendMessages.append( "<option value='" + days + "' selected='true'>" + days + "</option>" );
+			});
+			jQuery(".templateMessage").each( function( i, item ){ 
+				templateMessages.append( "<option value='" + item.value + "' selected='true'>" + item.value + "</option>" );
+			});
+			jQuery(".sendTo").each( function( i, item ){ 
+				sendTo.append( "<option value='" + item.value + "' selected='true'>" + item.value + "</option>" );
+			});
+			jQuery(".whenToSend").each( function( i, item ){ 
+				whenToSend.append( "<option value='" + item.value + "' selected='true'>" + item.value + "</option>" );
+			});
+			jQuery(".messageType").each( function( i, item ){ 
+				messageType.append( "<option value='" + item.value + "' selected='true'>" + item.value + "</option>" );
+			});
+			jQuery(".userGroup").each( function( i, item ){ 
+				userGroup.append( "<option value='" + item.value + "' selected='true'>" + item.value + "</option>" );
+			});
+		},
+		'rules' : getValidationRules( "programStage" )
 	});
 	
 	checkValueIsExist( "name", "validateProgramStage.action", {id:getFieldValue('programId'), programStageId:getFieldValue('id')});	

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/updateRelationshipTypeForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/updateRelationshipTypeForm.js	2012-03-19 09:35:42 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/updateRelationshipTypeForm.js	2014-08-06 15:20:54 +0000
@@ -1,9 +1,12 @@
 jQuery(document).ready(	function(){
 		
-		jQuery('aIsToB').focus();
-			
-		validation( 'updateRelationshipTypeForm', function(form){
-			validateUpdateRelationshipType();
-		}); 
-		
-	});	
\ No newline at end of file
+	jQuery('aIsToB').focus();
+		
+	validation2( 'updateRelationshipTypeForm', function( form )
+	{
+		validateUpdateRelationshipType();
+	},{
+		'rules' : getValidationRules( "relationshipType" )
+	});		
+		
+});	
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/updateValidationCriteria.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/updateValidationCriteria.js	2014-06-03 12:16:32 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/updateValidationCriteria.js	2014-08-06 15:20:54 +0000
@@ -1,7 +1,10 @@
 jQuery(document).ready(function(){
-	validation( 'validationCriteriaForm', function( form ){			
+	validation2( 'validationCriteriaForm', function( form )
+	{
 		form.submit();
-	});
+	},{
+		'rules' : getValidationRules( "validationCriteria" )
+	});	
 
 	checkValueIsExist( "name", "validateValidationCriteria.action", {id:getFieldValue('id')});
 });
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programIndicatorForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programIndicatorForm.vm	2014-04-26 12:14:51 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/programIndicatorForm.vm	2014-08-06 15:20:54 +0000
@@ -61,7 +61,9 @@
 		<td>
 			<fieldset>
 				<legend>$i18n.getString( "expression" ) <em title="$i18n.getString( "required" )" class="required">*</em></legend>
-				<textarea style="width:660px" id="expression" name="expression" onkeyup='getConditionDescription();' maxlength="254" class="{validate:{required:true}}">$!programIndicator.expression</textarea>
+				<table><tr><td>
+					<textarea style="width:660px" id="expression" name="expression" onkeyup='getConditionDescription();' >$!programIndicator.expression</textarea>
+				</td></tr></table>
 			</fieldset>
 		</td>
 	</tr>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/style/basic.css'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/style/basic.css	2014-04-30 08:19:21 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/style/basic.css	2014-08-06 15:20:54 +0000
@@ -94,4 +94,15 @@
 	max-height: 100px;
 	overflow-y: auto;
 	overflow-x: hidden;
+}
+
+.class-th {
+    border-bottom: 1px solid #cad5e5;
+    border-collapse: collapse;
+    color: #39547d;
+    font-size: 13px;
+    font-weight: bold;
+    min-height: 28px;
+    padding: 3px 0 3px 1px;
+    text-align: left;
 }
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateAttibuteForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateAttibuteForm.vm	2014-07-02 12:11:16 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateAttibuteForm.vm	2014-08-06 15:20:54 +0000
@@ -17,11 +17,11 @@
     <tbody>
       <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( $attribute.name )" class="{validate:{required:true,rangelength:[2,160]}}"></td>
+        <td><input type="text" id="name" name="name" value="$encoder.htmlEncode( $attribute.name )" ></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" value="$!encoder.htmlEncode( $attribute.shortName )" class="{validate:{required:true,rangelength:[2,50]}}"></td>
+        <td><input type="text" id="shortName" name="shortName" value="$!encoder.htmlEncode( $attribute.shortName )" ></td>
       </tr>     
       <tr>
         <td><label for="code">$i18n.getString( "code" )</td>
@@ -29,7 +29,7 @@
       </tr>      
       <tr>
         <td><label for="description">$i18n.getString( "description" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
-        <td><input type="text" id="description" name="description" value="$!encoder.htmlEncode( $attribute.description )" class="{validate:{required:true,minlength:2}}"></td>
+        <td><textarea id="description" name="description" >$!encoder.htmlEncode( $attribute.description )</textarea></td>
       </tr>
       
     <tr>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateAttibuteGroupForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateAttibuteGroupForm.vm	2014-06-03 04:55:04 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateAttibuteGroupForm.vm	2014-08-06 15:20:54 +0000
@@ -13,11 +13,11 @@
 	</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( $attributeGroup.name )" class="{validate:{required:true}}"/></td>
+		<td><input type="text" id="name" name="name" value="$encoder.htmlEncode( $attributeGroup.name )" /></td>
 	</tr>   
 	<tr>
 		<td><label for="description">$i18n.getString( "description" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
-		<td><input type="text" id="description" name="description" value="$encoder.htmlEncode( $attributeGroup.description )" class="{validate:{required:true}}"/></td>
+		<td><input type="text" id="description" name="description" value="$encoder.htmlEncode( $attributeGroup.description )" /></td>
 	</tr>
 	<tr>
 		<td colspan="2" height="15px"></td>
@@ -33,9 +33,9 @@
 	<tr>
 		<th>$i18n.getString( "availableAttribute" )</th>
 		<th>$i18n.getString( "filter" )</th>
-		<th>$i18n.getString( "selectedAttribute" )
-			<input type='hidden' id='hasAttributes' name='hasAttributes' class="{validate:{required:true}}">
-		</th>
+		<td class='class-th'>$i18n.getString( "selectedAttribute" )
+			<input type='hidden' id='attributeList' name='attributeList' >
+		</td>
 	</tr>
 	
 	<tr>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateCaseAggregation.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateCaseAggregation.vm	2014-05-30 08:04:25 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateCaseAggregation.vm	2014-08-06 15:20:54 +0000
@@ -24,7 +24,7 @@
 	
     <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" class="{validate:{required:true}}" value="$caseAggregation.name"></td>
+        <td><input type="text" id="name" name="name" value="$caseAggregation.name"></td>
     </tr>
     
     <tr>
@@ -44,7 +44,7 @@
 		<td>
 			<input id="aggregationDataElementInput" name="aggregationDataElementInput" value='$caseAggregation.aggregationDataElement.name $caseAggregation.optionCombo.name' style='width:300px;'>
 			<a style='width:20px; margin-bottom:-5px;height:20px;' id='dataElementsButton' name='dataElementsButton'></a>
-			<input id="aggregationDataElementId" name="aggregationDataElementId" value="$caseAggregation.aggregationDataElement.id.$caseAggregation.optionCombo.id" class="{validate:{required:true}} hidden" >
+			<input id="aggregationDataElementId" name="aggregationDataElementId" value="$caseAggregation.aggregationDataElement.id.$caseAggregation.optionCombo.id" class="hidden" >
 		</td>				
 	</tr>
 	<tr>
@@ -86,7 +86,7 @@
 			<label for="deSumId">$i18n.getString( "data_element_for_sum_avg_min_max" ) <em title="$i18n.getString( "required" )" class="required">*</em></label>
 		</td>
 		<td>
-			<select id="deSumId" name="deSumId" class="{validate:{required:true}}" #if( $caseAggregation.deSum ) #else disabled #end>
+			<select id="deSumId" name="deSumId" #if( $caseAggregation.deSum ) #else disabled #end>
 				#if( $caseAggregation.deSum )
 				<option value='$caseAggregation.deSum.id'>$caseAggregation.deSum.displayName</option>
 				#end

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramForm.vm	2014-08-01 06:56:13 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramForm.vm	2014-08-06 15:20:54 +0000
@@ -1,58 +1,62 @@
 <script>
 	jQuery( document ).ready( function()
 	{
-		validation( 'updateProgramForm', function( form ){
+		validation2( 'updateProgramForm', function( form )
+		{
 			enable('dateOfEnrollmentDescription');
 			enable('dateOfIncidentDescription');
 			form.submit();
-		}, function(){
-			var selectedPropertyIds = jQuery( "#selectedPropertyIds" );
-			selectedPropertyIds.empty();
-			var personDisplayNames = jQuery( "#personDisplayNames" );
-			personDisplayNames.empty();
-			var compulsaryIdentifier = jQuery( "#compulsaryIdentifier" );
-			compulsaryIdentifier.empty();
-			var mandatorySelector = jQuery( "#mandatory" );
-			mandatorySelector.empty();		
-			var allowFutureDateSelector = jQuery( "#allowFutureDate" );
-			allowFutureDateSelector.empty();
-			
-			if( getFieldValue('type') != 3 ){
-				var isDisplayed = false;
-				jQuery("#selectedList").find("tr").each( function( i, item ){
-					selectedPropertyIds.append( "<option value='" + item.id + "' selected='true'>" + item.id + "</option>" );
-					var displayed = jQuery( item ).find( "input[name='displayed']:first");
-					var checked = displayed.attr('checked') ? true : false;
-					if( checked ){
-						isDisplayed = true
+		},{
+			'beforeValidateHandler' : function()
+			{
+				var selectedPropertyIds = jQuery( "#selectedPropertyIds" );
+				selectedPropertyIds.empty();
+				var personDisplayNames = jQuery( "#personDisplayNames" );
+				personDisplayNames.empty();
+				var compulsaryIdentifier = jQuery( "#compulsaryIdentifier" );
+				compulsaryIdentifier.empty();
+				var mandatorySelector = jQuery( "#mandatory" );
+				mandatorySelector.empty();
+				var allowFutureDateSelector = jQuery( "#allowFutureDate" );
+				allowFutureDateSelector.empty();
+				
+				if( getFieldValue('type') != 3 ){
+					
+					var isDisplayed = false;
+					jQuery("#selectedList").find("tr").each( function( i, item ){
+						selectedPropertyIds.append( "<option value='" + item.id + "' selected='true'>" + item.id + "</option>" );
+						var displayed = jQuery( item ).find( "input[name='displayed']:first");
+						var checked = displayed.attr('checked') ? true : false;
+						personDisplayNames.append( "<option value='" + checked + "' selected='true'>" + checked + "</option>" );
+						if( checked ){
+							isDisplayed = true
+						}
+						
+						// mandatory
+						var mandatory = jQuery( item ).find( "input[name='mandatory']:first");
+						checked = mandatory.attr('checked') ? true : false;
+						mandatorySelector.append( "<option value='" + checked + "' selected='true'>" + checked + "</option>" );
+						
+						// allowFutureDate
+						var allowFutureDate = jQuery( item ).find( "input[name='allowFutureDate']:first");
+						checked = allowFutureDate.attr('checked') ? true : false;
+						allowFutureDateSelector.append( "<option value='" + checked + "' selected='true'>" + checked + "</option>" );
+					});
+					if( jQuery("#selectedList").find("tr").length > 0 && isDisplayed ){
+						compulsaryIdentifier.append( "<option value='0' selected='true'></option>");
 					}
-					personDisplayNames.append( "<option value='" + checked + "' selected='true'>" + checked + "</option>" );
-					
-					// mandatory
-					var mandatory = jQuery( item ).find( "input[name='mandatory']:first");
-					checked = mandatory.attr('checked') ? true : false;
-					mandatorySelector.append( "<option value='" + checked + "' selected='true'>" + checked + "</option>" );
-					
-					// allowFutureDate
-					var allowFutureDate = jQuery( item ).find( "input[name='allowFutureDate']:first");
-					checked = allowFutureDate.attr('checked') ? true : false;
-					allowFutureDateSelector.append( "<option value='" + checked + "' selected='true'>" + checked + "</option>" );
-				});
-				if( jQuery("#selectedList").find("tr").length > 0 && isDisplayed ){
+				}
+				else{
 					compulsaryIdentifier.append( "<option value='0' selected='true'></option>");
 				}
-			}
-			else{
-				compulsaryIdentifier.append( "<option value='0' selected='true'></option>");
-			}
-			
+			},
+			'rules' : getValidationRules( "program" )
 		});
+		
 	    checkValueIsExist( "name", "validateProgram.action",{id:getFieldValue('id')} );
-	    
+	    programOnChange();
 		var i18n_characters_without_params = '$encoder.jsEscape( $i18n.getString( "characters_without_params" ) , "'")';
-		
-		programOnChange();
-    });
+	});
 
 </script>
 
@@ -81,7 +85,7 @@
 		</tr>
 
 		<tr>
-			<td><label for="type">$i18n.getString( "type" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
+			<td><label for="type">$i18n.getString( "type" ) </label></td>
 			<td>
 				<select id="type" name="type" onchange='programOnChange();' class="{validate:{required:true}}">
 					<option value='1' #if( $program.type=='1' ) selected #end>$i18n.getString('multiple_events_with_registration')</option>
@@ -107,7 +111,7 @@
 		
 		<tr>
 			<td><label for="version">$i18n.getString( "version" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
-			<td><input type="text" id="version" name="version" value="$program.version" class="{validate:{required:true,integer:true}}"></td>
+			<td><input type="text" id="version" name="version" value="$!program.version" ></td>
 			<td></td>
 		</tr>
 		

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramIndicator.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramIndicator.vm	2014-06-02 02:07:05 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramIndicator.vm	2014-08-06 15:20:54 +0000
@@ -1,8 +1,15 @@
 <script>
 jQuery( document ).ready( function()
 {
-	validation( 'programIndicatorForm', function(form){
+	validation2( 'programIndicatorForm', function( form )
+	{
 		form.submit();
+	},{
+		'beforeValidateHandler' : function()
+		{
+			
+		},
+		'rules' : getValidationRules( "programIndicator" )
 	});
 	
 	checkValueIsExist( "name", "validateProgramIndicator.action",{id:getFieldValue('id')} );	
@@ -25,17 +32,17 @@
     </thead>
 	<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" class="{validate:{required:true,minlength:2}}" value='$programIndicator.name'></td>
+		<td><input type="text" id="name" name="name" value='$programIndicator.name'></td>
 		<td></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" class="{validate:{required:true,minlength:2}}" value='$programIndicator.shortName'></td>
+		<td><input type="text" id="shortName" name="shortName" value='$programIndicator.shortName'></td>
 		<td></td>
 	</tr>	
 	<tr>
 		<td><label for="code">$i18n.getString( "code" )</label></td>
-		<td><input type="text" id="code" name="code" class="{validate:{minlength:2}}" value='$programIndicator.code'></td>
+		<td><input type="text" id="code" name="code" value='$programIndicator.code'></td>
 		<td></td>
 	</tr>	
 	<tr>
@@ -46,7 +53,7 @@
 	<tr>
 		<td><label for="valueType">$i18n.getString( "value_type" )</label></td>
 		<td>
-			<select id="valueType" name="valueType" onchange='programIndicatorOnChange();' class="{validate:{required:true}}">
+			<select id="valueType" name="valueType" onchange='programIndicatorOnChange();' >
 				<option value='int' #if( $programIndicator.valueType=='int' ) selected #end>$i18n.getString('int')</option>
 				<option value='date' #if( $programIndicator.valueType=='date' ) fasdfasdf selected #end>$i18n.getString('date')</option>
 			</select>
@@ -56,7 +63,7 @@
 	<tr id='rootDateTR' #if($programIndicator.valueType!='date') style='display:none' #end >
 		<td><label for="rootDate">$i18n.getString( "date_for_calculating" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
 		<td>
-			<select id="rootDate" name="rootDate" class="{validate:{required:true}}">
+			<select id="rootDate" name="rootDate" >
 				<option value='incident_date'>$i18n.getString('incident_date')</option>
 				<option value='execution_date'>$i18n.getString('report_date')</option>
 				<option value='current_date'>$i18n.getString('current_date')</option>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramReminder.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramReminder.vm	2014-06-04 11:38:43 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramReminder.vm	2014-08-06 15:20:54 +0000
@@ -35,10 +35,15 @@
 	{
 		showHideUserGroup();
 		
-		validation( 'updateReminderForm', function( form ){
+		validation2( 'updateReminderForm', function( form )
+		{
 			form.submit();
-		}, function(){
-			enable('messageType');
+		},{
+			'beforeValidateHandler' : function()
+			{
+				enable('messageType');
+			},
+			'rules' : getValidationRules( "trackedEntityInstanceReminder" )
 		});
 		checkValueIsExist( "name", "validateReminder.action",{id:getFieldValue('id')} );
 	});
@@ -61,7 +66,7 @@
     <tbody>
 		<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( $reminder.name )" class="{validate:{required:true,minlength:4}}"></td>
+			<td><input type="text" id="name" name="name" value="$encoder.htmlEncode( $reminder.name )" ></td>
 			<td></td>
 		</tr>
 		<tr>
@@ -91,8 +96,7 @@
 				#set($value=-1 * $value)
 			#end
 			<td><label for="days">$i18n.getString( "send_message" )</label></td>
-			<td><input type="text" id="days" name="days" 
-				class="{validate:{required:true,number:true}}" value="$!value"
+			<td><input type="text" id="days" name="days" value="$!value"
 				onkeyup='setRealDays();' style="width:100px;"
 				#if($!reminder.whenToSend==1 || $!reminder.whenToSend==3 ) disabled #end />
 				$i18n.getString('days')
@@ -108,7 +112,7 @@
 		<tr>
 			<td><label for="sendTo">$i18n.getString( "recipients" )</label></td>
 			<td>
-				<select type="text" id="sendTo" name="sendTo" class="{validate:{required:true,number:true}}" onchange="onchangeUserGroup()">
+				<select type="text" id="sendTo" name="sendTo" onchange="onchangeUserGroup()">
 					<option value="1" #if($!reminder.sendTo==1) selected #end >$i18n.getString("tracked_entity_sms_only")</option>
 					<option value="3" #if($!reminder.sendTo==3) selected #end >$i18n.getString("orgunit_phone_number_sms_only")</option>
 					<option value="2" #if($!reminder.sendTo==2) selected #end >$i18n.getString("attribute_users")</option>
@@ -131,7 +135,7 @@
 		<tr>
 			<td><label for="messageType">$i18n.getString( "message_type" )</label></td>
 			<td>
-				<select type="text" id="messageType" name="messageType" #if($!reminder.sendTo==1 || $!reminder.sendTo==3) disabled #end class="messageType {validate:{required:true,number:true}}" >
+				<select type="text" id="messageType" name="messageType" #if($!reminder.sendTo==1 || $!reminder.sendTo==3) disabled #end class="messageType" >
 					<option value="1" #if($!reminder.messageType==1) selected #end >$i18n.getString("direct_sms")</option>
 					<option value="2" #if($!reminder.messageType==2) selected #end >$i18n.getString("message")</option>
 					<option value="3" #if($!reminder.messageType==3) selected #end >$i18n.getString("both")</option>
@@ -156,7 +160,7 @@
 		</tr>
 		<tr>
 			<td><label for="templateMessage">$i18n.getString( "message" )</label></td>
-			<td><textarea onkeyup="getMessageLength()" id="templateMessage" name="templateMessage" class="templateMessage {validate:{required:true}}">$reminder.templateMessage</textarea></td>
+			<td><textarea onkeyup="getMessageLength()" id="templateMessage" name="templateMessage" class="templateMessage">$reminder.templateMessage</textarea></td>
 		</tr>
 		<tr>
 			<td></td>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramStageForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramStageForm.vm	2014-07-29 17:14:27 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramStageForm.vm	2014-08-06 15:20:54 +0000
@@ -29,18 +29,18 @@
 		<tbody>
 			<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( $programStage.name )" class="{validate:{required:true,rangelength:[4,160]}}"/></td>
+				<td><input type="text" id="name" name="name" value="$encoder.htmlEncode( $programStage.name )" /></td>
 			</tr>
 
 			<tr>
 				<td><label for="description">$i18n.getString( "description" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
-				<td><input type="text" id="description" name="description" value="$encoder.htmlEncode( $programStage.description )" class="{validate:{required:true,minlength:4}}"/></td>
+				<td><input type="text" id="description" name="description" value="$encoder.htmlEncode( $programStage.description )" /></td>
 			</tr> 
 			
 			#if($programStage.program.type==1)
 			<tr>
 				<td><label for="minDaysFromStart">$i18n.getString( "scheduled_days_from_start" )</label></td>
-				<td><input type="text" id="minDaysFromStart" name="minDaysFromStart" value="$programStage.minDaysFromStart" class="{validate:{number:true,min:0}}"/></td>
+				<td><input type="text" id="minDaysFromStart" name="minDaysFromStart" value="$programStage.minDaysFromStart" /></td>
 			</tr>
 			
 			<tr><th colspan="2">$i18n.getString( "repeatable_program_stage_details" )</th></tr>
@@ -57,7 +57,7 @@
 
 			<tr>
 				<td><label for="standardInterval">$i18n.getString( "standard_interval_days" )</label></td>
-				<td><input type="text" id="standardInterval" name="standardInterval" value='$!programStage.standardInterval'class="{validate:{number:true}}" #if($programStage.irregular!='true' ) disabled #end /></td>
+				<td><input type="text" id="standardInterval" name="standardInterval" value='$!programStage.standardInterval'#if($programStage.irregular!='true' ) disabled #end /></td>
 			</tr>
 			
 			#end
@@ -96,7 +96,7 @@
 				<tr>
 					<td><label for="reportDateToUse">$i18n.getString( "report_date_to_use" )</label></td>
 					<td>
-						<select id="reportDateToUse" name="reportDateToUse" class="{validate:{required:true}}" 
+						<select id="reportDateToUse" name="reportDateToUse"  
 							#if($openAfterEnrollment!='' || $programStage.autoGenerateEvent=='false' ) disabled #elseif($programStage.openAfterEnrollment=='false') disabled #end >
 							<option value=''>[$i18n.getString('please_select')]</option>
 							<option value='dateOfIncident' #if($programStage.reportDateToUse=='dateOfIncident') selected #end >$i18n.getString("date_of_incident")</option>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramStageReminder.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramStageReminder.vm	2014-06-04 11:14:18 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramStageReminder.vm	2014-08-06 15:20:54 +0000
@@ -4,9 +4,17 @@
 	{
 		showHideUserGroup();
 		
-		validation( 'updateReminderForm', function( form ){
+		validation2( 'updateReminderForm', function( form )
+		{
 			form.submit();
+		},{
+			'beforeValidateHandler' : function()
+			{
+				enable('messageType');
+			},
+			'rules' : getValidationRules( "trackedEntityInstanceReminder" )
 		});
+		
 		checkValueIsExist( "name", "validateReminder.action",{id:getFieldValue('id')} );
 	});
 	var i18n_characters_without_params = '$encoder.jsEscape( $i18n.getString( "characters_without_params" ) , "'")';
@@ -29,7 +37,7 @@
     <tbody>
 		<tr>
 			<td><label for="name">$i18n.getString( "name" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
-			<td><input style="width: 330px;" type="text" id="name" name="name" value="$encoder.htmlEncode( $reminder.name )" class="{validate:{required:true,minlength:4}}"></td>
+			<td><input style="width: 330px;" type="text" id="name" name="name" value="$encoder.htmlEncode( $reminder.name )" ></td>
 			<td></td>
 		</tr>
 		<tr>
@@ -50,7 +58,6 @@
 			#end
 			<td><label for="days">$i18n.getString( "send_message" )</label></td>
 			<td><input type="text" id="days" name="days" 
-				class="{validate:{required:true,number:true}}" value="$!value"
 				onkeyup='setRealDays();' style="width:100px;"
 				#if($!reminder.whenToSend==1 || $!reminder.whenToSend==3 ) disabled #end />
 				$i18n.getString('days')
@@ -66,7 +73,7 @@
 		<tr>
 			<td><label for="sendTo">$i18n.getString( "recipients" )</label></td>
 			<td>
-				<select type="text" id="sendTo" name="sendTo" class="{validate:{required:true,number:true}}" onchange="onchangeUserGroup()">
+				<select type="text" id="sendTo" name="sendTo" onchange="onchangeUserGroup()">
 					<option value="1" #if($!reminder.sendTo==1) selected #end >$i18n.getString("tracked_entity_sms_only")</option>
 					<option value="3" #if($!reminder.sendTo==3) selected #end >$i18n.getString("orgunit_phone_number_sms_only")</option>
 					<option value="2" #if($!reminder.sendTo==2) selected #end >$i18n.getString("attribute_users")</option>
@@ -78,7 +85,7 @@
 		<tr>
 			<td><label for="userGroup">$i18n.getString( "user_group" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
 			<td>
-				<select type="text" id="userGroup" name="userGroup" #if($!reminder.sendTo!=5) disabled #end class="{validate:{required:true}}" >
+				<select type="text" id="userGroup" name="userGroup" #if($!reminder.sendTo!=5) disabled #end >
 					<option value="">[$i18n.getString("please_select")]</option>
 					#foreach($eachGroup in $userGroups)
 					<option value="$eachGroup.id" #if($!reminder.userGroup.id==$eachGroup.id) selected #end>$i18n.getString($eachGroup.name)</option>
@@ -89,7 +96,7 @@
 		<tr>
 			<td><label for="messageType">$i18n.getString( "message_type" )</label></td>
 			<td>
-				<select type="text" id="messageType" name="messageType" #if($!reminder.sendTo==1 || $!reminder.sendTo==3) disabled #end class="messageType {validate:{required:true,number:true}}" >
+				<select type="text" id="messageType" name="messageType" #if($!reminder.sendTo==1 || $!reminder.sendTo==3) disabled #end class="messageType" >
 					<option value="1" #if($!reminder.messageType==1) selected #end >$i18n.getString("direct_sms")</option>
 					<option value="2" #if($!reminder.messageType==2) selected #end >$i18n.getString("message")</option>
 					<option value="3" #if($!reminder.messageType==3) selected #end >$i18n.getString("both")</option>
@@ -113,7 +120,7 @@
 		</tr>
 		<tr>
 			<td><label for="message">$i18n.getString( "message" )</label></td>
-			<td><textarea onkeyup="getMessageLength()" id="templateMessage" name="templateMessage" style="width:320px" class="templateMessage {validate:{required:true}}">$reminder.templateMessage</textarea></td>
+			<td><textarea onkeyup="getMessageLength()" id="templateMessage" name="templateMessage" style="width:320px" class="templateMessage">$reminder.templateMessage</textarea></td>
 		</tr>
 		<tr>
 			<td></td>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramStageSectionForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramStageSectionForm.vm	2014-04-26 12:14:51 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramStageSectionForm.vm	2014-08-06 15:20:54 +0000
@@ -1,13 +1,18 @@
 <script>
 jQuery( document ).ready( function()
 {
-	validation( 'programStageSectionForm', function(form){
-		selectAllById('dataElementIds');
+	validation2( 'programStageSectionForm', function( form )
+	{
 		form.submit();
-	}, function(){
-		if(jQuery("#dataElementIds option").length > 0 ){
-			setFieldValue('hasDataElement', 'true');
-		}
+	},{
+		'beforeValidateHandler' : function()
+		{
+			selectAllById('dataElementIds');
+			if(jQuery("#dataElementIds option").length > 0 ){
+				setFieldValue('dataElementList', 'true');
+			}
+		},
+		'rules' : getValidationRules( "programStageSection" )
 	});
 		
 	checkValueIsExist( "name", "validateProgramStageSection.action", {id:getFieldValue('id'),programStageId:getFieldValue('programStageId')});	
@@ -30,7 +35,7 @@
 	<tbody>
 		<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" class="{validate:{required:true,rangelength:[2,160]}}" value='$section.name'/></td>
+			<td><input type="text" id="name" name="name" value='$section.name'/></td>
 		</tr>
 	</tbody>
 </table>
@@ -45,10 +50,10 @@
       <tr>        
         <th>$i18n.getString( "available_data_elements" )</th>
         <th></th>
-        <th>
+        <td class="class-th">
 			$i18n.getString( "selected_data_elements" )
-			<input type='hidden' id='hasDataElement' name='hasDataElement' class="{validate:{required:true}}">
-		</th>
+			<input type='hidden' id='dataElementList' name='dataElementList' >
+		</td>
       </tr>
     </thead>
   

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateRelationshipTypeForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateRelationshipTypeForm.vm	2014-04-26 12:14:51 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateRelationshipTypeForm.vm	2014-08-06 15:20:54 +0000
@@ -14,15 +14,15 @@
     <tbody>
 		<tr>
 			<td><label for="aIsToB">$i18n.getString( "a_is_to_b" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
-			<td><input type="text" id="aIsToB" name="aIsToB" value="$encoder.htmlEncode( $relationshipType.aIsToB )" class="{validate:{required:true,rangelength:[2,160]}}"/></td>
+			<td><input type="text" id="aIsToB" name="aIsToB" value="$encoder.htmlEncode( $relationshipType.aIsToB )" /></td>
 		</tr>   
 		<tr>
 			<td><label for="bIsToA">$i18n.getString( "b_is_to_a" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
-			<td><input type="text" id="bIsToA" name="bIsToA" value="$encoder.htmlEncode( $relationshipType.bIsToA )" class="{validate:{required:true,rangelength:[2,160]}}"/></td>
+			<td><input type="text" id="bIsToA" name="bIsToA" value="$encoder.htmlEncode( $relationshipType.bIsToA )" /></td>
 		</tr>
 		<tr>
 			<td><label for="name">$i18n.getString( "description" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
-			<td><input type="text" id="name" name="name" value="$encoder.htmlEncode( $relationshipType.name )" class="{validate:{required:true,rangelength:[2,160]}}"/></td>
+			<td><input type="text" id="name" name="name" value="$encoder.htmlEncode( $relationshipType.name )" /></td>
 		</tr>
     </tbody>
 	<tr>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateSingleProgramValidationForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateSingleProgramValidationForm.vm	2014-06-04 09:39:16 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateSingleProgramValidationForm.vm	2014-08-06 15:20:54 +0000
@@ -18,13 +18,13 @@
 	<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' class="{validate:{required:true,minlength:4}}" value="$validation.name" >
+			<input type="text" id='name' name='name' value="$validation.name" >
 		</td>
 	</tr>
 	<tr>
 		<td><label for="operator">$encoder.htmlEncode( $i18n.getString( "operator" ) ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
 		<td>
-			<select id="operator" name="operator" class="{validate:{required:true}}">
+			<select id="operator" name="operator" >
 				<option value="">[ $i18n.getString( "please_select" ) ]</option>
 				<option value="equal_to" #if ( $validation.operator == 'equal_to' )selected="selected"#end>$encoder.htmlEncode( $i18n.getString( "equal_to" ) )</option>
 				<option value="not_equal_to" #if ( $validation.operator == 'not_equal_to' )selected="selected"#end>$encoder.htmlEncode( $i18n.getString( "not_equal_to" ) )</option>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateTrackedEntity.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateTrackedEntity.vm	2014-04-26 12:14:51 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateTrackedEntity.vm	2014-08-06 15:20:54 +0000
@@ -1,7 +1,10 @@
 <script>
 	jQuery(document).ready(	function(){
-		validation( 'updateTrackedEntityForm', function(form){
-				form.submit();
+		validation2( 'updateTrackedEntityForm', function( form )
+		{
+			form.submit();
+		},{
+			'rules' : getValidationRules( "trackedEntity" )
 		});
 		
 		checkValueIsExist( "name", "validateTrackedEntity.action", {id:getFieldValue('id')});

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateValidationCriteria.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateValidationCriteria.vm	2014-07-27 15:02:58 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateValidationCriteria.vm	2014-08-06 15:20:54 +0000
@@ -12,11 +12,11 @@
 		</tr>
 		<tr>
 			<td><label for="name">$i18n.getString('name') <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
-			<td colspan="2"><input type='text' id='name' name='name' value="$validationCriteria.name" class="{validate:{required:true,rangelength:[2,160]}}"/></td>
+			<td colspan="2"><input type='text' id='name' name='name' value="$validationCriteria.name" /></td>
 		</tr>
 		<tr>
 			<td><label for="description">$i18n.getString('description') <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
-			<td colspan="2"><input type='text' id='description' name='description' value="$validationCriteria.description" class="{validate:{required:true,rangelength:[2,160]}}" /></td>
+			<td colspan="2"><input type='text' id='description' name='description' value="$validationCriteria.description" /></td>
 		</tr>
 		<tr>
 			<td><label for="property">$i18n.getString('criteria')<em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
@@ -46,7 +46,7 @@
 							</select>
 						</td>
 						<td id='valueTD'>
-							<input type='text' id='value' name='value' class="{validate:{required:true}}" style="width:140px;" value='$validationCriteria.value' />
+							<input type='text' id='value' name='value' style="width:140px;" value='$validationCriteria.value' />
 						</td>
 					</tr>
 				</table>