Have Text Area were we enter semicolon separated values, able to process for the keyboard events and validating successfully.How to validate the same on copy paste.

```
$(function () {
    var kpi = document.getElementById('<%=this.d.ClientID%>').value;
    var tb = $('#<%= TextBox.ClientID %>');
    $(tb).keypress(function (e) {
        var regex = new RegExp("[0-9;]+$");
        var str = String.fromCharCode(!e.charCode ? e.which : e.charCode);
        if (regex.test(str) && !($(this).val().match(/;{2,}/))) {
            var as = $(this).val().match(/;/ig) || [];
            var len = as.length;
            if (len < kpi) {
                return true;
            }
        }
        e.preventDefault();
        return false;
    });
    $(tb).keyup(function (e) {
        var str = String.fromCharCode(!e.charCode ? e.which : e.charCode);
        if (($(this).val().match(/[;]{2,}/g))) {
            var shortenedString = $(this).val().substr(0, ($(this).val().length - 1));
            $(this).val(shortenedString);
            return true;
        }
        e.preventDefault();
        return false;
    });
    $(tb).on('paste input propertychange', function (e) {
        //Validate interger with ; on paste and rest not allowed
    })
});

```