Sha256: 17857a0d34a098412be96057f137ff0faf4bf6334489c3ece998146615f7a465
Contents?: true
Size: 1.13 KB
Versions: 167
Compression:
Stored size: 1.13 KB
Contents
function RadEmailValidator(parentElement) { var rules = { "rs-from": { required: true, email: true, messages: { required: "From email is required." } }, "rs-from_name": { required: true, messages: { required: "From name is required." } }, "rs-to": { required: true, email: true, messages: { required: "To email is required" } }, "rs-message": { required: true, messages: { required: "Email message is required." } } }; this.addRules = function() { for (var key in rules) { $(parentElement).find("[id$=" + key + "]").rules("add", rules[key]); } }; this.removeRules = function() { for (var key in rules) { $(parentElement).find("[id$=" + key + "]").rules("remove"); } }; function elementKeyFor(key) { return "[id$=" + parentElement.attr('id') + '_' + key + ']'; } }
Version data entries
167 entries across 167 versions & 2 rubygems