From d406d6481df06f920b7f452b013f5e8c2a4185e2 Mon Sep 17 00:00:00 2001 From: Petr Vobornik Date: Jan 11 2012 17:04:22 +0000 Subject: Added validation logic to multivalued text field https://fedorahosted.org/freeipa/ticket/1466 --- diff --git a/install/ui/field.js b/install/ui/field.js index fc6b75d..8db0c87 100644 --- a/install/ui/field.js +++ b/install/ui/field.js @@ -522,7 +522,35 @@ IPA.multivalued_field = function(spec) { that.widget_value_changed = function() { that.set_dirty(that.test_dirty()); - //that.validate(); disabling validation for now + that.validate(); + }; + + that.validate = function() { + + that.hide_error(); + that.valid = true; + + var values = that.save(); + + if (that.is_empty(values)) { + return that.valid; + } + + for (var i=0; i