function validateValueCustomField(control) {
    validateOnlyDigits(control);
}

function validateOnlyDigits(control) {
    var value = control.value;
    var newValue = "";
    for (var i = 0; i < value.length; i++) {
        var c = value.charAt(i);
        if (c >= '0' && c <= '9') {
            newValue += c;
        }
    }

    if (newValue.length != value.length) {
        control.value = newValue;
    }
}
function validateMaxLengh(elem, size) {
    if (elem.value.length > size) {
        elem.value = elem.value.substr(0, size);
    }
}

