[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] conga/luci/cluster validate_fence.js



CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	rmccabe sourceware org	2007-02-16 23:25:27

Modified files:
	luci/cluster   : validate_fence.js 

Log message:
	Fix a front-end fence instance validation bug.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/validate_fence.js.diff?cvsroot=cluster&r1=1.5&r2=1.6

--- conga/luci/cluster/validate_fence.js	2007/02/12 23:26:54	1.5
+++ conga/luci/cluster/validate_fence.js	2007/02/16 23:25:27	1.6
@@ -146,9 +146,11 @@
 
 	for (var i = 0 ; i < fields.length ; i++) {
 		var field_name = fields[i];
-		var err = field_validator[field_name](form, form[field_name]);
-		if (err)
-			errors = errors.concat(err);
+		if (form[field_name]) {
+			var err = field_validator[field_name](form, form[field_name]);
+			if (err)
+				errors = errors.concat(err);
+		}
 	}
 
 	return (errors);
@@ -183,9 +185,11 @@
 
 	for (var i = 0 ; i < fields.length ; i++) {
 		var field_name = fields[i];
-		var err = field_validator[field_name](form[field_name]);
-		if (err)
-			errors = errors.concat(err);
+		if (form[field_name]) {
+			var err = field_validator[field_name](form, form[field_name]);
+			if (err)
+				errors = errors.concat(err);
+		}
 	}
 
 	return (errors);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]