diff options
author | wei <> | 2006-10-28 07:43:27 +0000 |
---|---|---|
committer | wei <> | 2006-10-28 07:43:27 +0000 |
commit | 5bd4f1f34bb08469d3e18727f9d39c53037c6424 (patch) | |
tree | 7da05a55d69be12976635107f448d4f99d4964b2 /framework/Web/Javascripts/prado | |
parent | e4c9e8e311dc09424e4b865f53a0a6fe6872c4e6 (diff) |
Add TActiveCustomValidator to change ErrorMessage on callbback.
Diffstat (limited to 'framework/Web/Javascripts/prado')
-rw-r--r-- | framework/Web/Javascripts/prado/validation3.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/framework/Web/Javascripts/prado/validation3.js b/framework/Web/Javascripts/prado/validation3.js index 55ebc095..aa4c726b 100644 --- a/framework/Web/Javascripts/prado/validation3.js +++ b/framework/Web/Javascripts/prado/validation3.js @@ -140,6 +140,21 @@ Object.extend(Prado.Validation, else
throw new Error("A validation manager for form '"+formID+"' needs to be created first.");
return this.managers[formID];
+ },
+
+ setErrorMessage : function(validatorID, message)
+ {
+ $H(Prado.Validation.managers).each(function(manager)
+ {
+ manager[1].validators.each(function(validator)
+ {
+ if(validator.options.ID == validatorID)
+ {
+ validator.options.ErrorMessage = message;
+ $(validatorID).innerHTML = message;
+ }
+ });
+ });
}
});
|