﻿String.prototype.startsWith = function(str) { return (this.match("^" + str) == str) }
function ComboValidator(source, args) {
    var combo = document.getElementById(source.id.substring(0, source.id.indexOf('_req')));
    if (combo.tagName != "SELECT") {
        combo = document.getElementById(source.id.substring(0, source.id.indexOf('_reqVal'))); // if comboBox in table
    }
    var val = combo.options[combo.selectedIndex].text;
    if (val.startsWith('--'))
        args.IsValid = false;
    else
        args.IsValid = true;
}
