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

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -