JSFiddle - React, Tailwind, and code Playground
HTML
<b>Name</b>
<input type="text" id="name" class="alphabetOnly"/>
JavaScript
$(".alphabetOnly").bind('paste', function (e) {
var self = this;
setTimeout(function (e) {
var val = $(self).val();
if (val != '0') {
if (val.match(/^[0-9]+$/) != null) {
$(".alphabetOnly").val("");
}
$(this).val(val);
}
}, 0);
});