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

android - Inheriting from Theme.AppCompat* -

broadcastreceiver - android BOOT_COMPLETED not received if not activity intent-filter -

basic authentication with http post params android -