jQuery validation to accept only three letters in a textbox -


this code. want add form validation accepts 3 letters. can 1 help?

if ( unitbrief === "" ) {     $("#divvalidationmessageconfigurationtab").css('display' , 'inline');     $("#spnvalidationtext").text("unit brief required.");     $(".unitbrief").focus();     return; } 

did mean this?

if( ! /^[a-z]{3}$/i.test(unitbrief) ) { ... not 3 letters ... } 

Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -