mardi 21 août 2018

Jquery Validation for more than two condtions in if

Need to check the dynamic values in if conditions OR Switch case

Pattern = '#####';
if(pattern == '#####'){
//Will Work     
}

But I need to allow if the pattern is '###' OR '#######' but not to allow any other combinations like '##r'.

Aucun commentaire:

Enregistrer un commentaire