How can I validate the cardholder's name?

This can be done using the below java script in SecurePay customization. The java script does the validation but it is not connected to any setup in Merchants Portal.
var wpwlOptions = { 
style:"card", 
onBeforeSubmitCard: function(e){ 
var holder = $('.wpwl-control-cardHolder').val(); 
if (holder.trim().length < 2){ 
$('.wpwl-control-cardHolder').addClass('wpwl-has-error').after('<div class="wpwl-hint wpwl-hint-cardHolderError">Invalid card holder</div>'); 
return false; 
} 
return true; 
} 
}