Variable restriction to lower case and a max length

jkhovren
Tera Contributor

I have a single line variable defined and my bp wants the field to be limited to 12 or less characters and can I restrict them to only enter lower case alphanumeric characters?  How would I code this?

1 REPLY 1

Danish Bhairag2
Tera Sage
Tera Sage

Hi @jkhovren ,

 

You can try on Change Client Script Here to validate both the scenarios. Try below code if it works or not

 

if(newValue.length == 12 && isLowerCase(newValue) == true){
// do nothing
}else{
alert('Please Validate if the entered Value is 12 characters or less & is in Lower Case format')
}

 

Thanks,

Danish