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
Post a Comment