Design a site like this with
Get started

Function to validate name for numbers and special characters

Solution In Jquery var ValidateName= function (usr) { var regexp = new RegExp('^[A-Za-z]+$'); var check = $(usr).val(); if (!regexp.test(check)) { alert('Numbers and Special Characters are not allowed'); $('#UserRole').css('border-color', 'red'); return false; } else { $('#UserRole').css('border-color', 'green'); return true; } } HTML <div class="col-sm-4 tb-font"> @Html.Label("Role", "User Role", new { style = "width:140px; margin-bottom:5px; margin-top:5px; float:... Continue Reading →

Create a free website or blog at

Up ↑