Name
sn_agent.AgentNowCommandValidator
Description
No description available
Script
var AgentNowCommandValidator = Class.create();
AgentNowCommandValidator.prototype = {
initialize: function() {},
alertOnBadChars: function(current, value) {
if (/\$\(.*\)|\$\{.*\}|;|<|>|&|.*`/.test(value)) {
gs.addErrorMessage(gs.getMessage("Command or parameter cannot contain ;, $(), ${}, `, <, >, &"));
current.setAbortAction(true);
}
},
alertOnSpaceInParamName: function(current, name) {
if (/\.*\s.*/.test(name)) {
gs.addErrorMessage(gs.getMessage("Parameter name cannot contain a space"));
current.setAbortAction(true);
}
},
type: 'AgentNowCommandValidator'
};
Sys ID
43160668dbf050109e6f9015ca961958