how to write a script for only alphabet letters using ServiceNow

Ashok M
Tera Contributor

The employee name should contain only alphabets and space and not more than 30 characters on the whole.
7 REPLIES 7

Hi, I Hope my solution helps you, if it helps please mark my response as correct and helpful so that it will be helpful for the future readers

Mahesh23
Mega Sage

Hi,

You can achieve your requirement without scripting. please refer below doc

 

https://docs.servicenow.com/bundle/sandiego-servicenow-platform/page/product/service-catalog-managem...

OlaN
Giga Sage
Giga Sage

Hi,

You can also have the regex validate the length, instead of changing the dictionary entry.

var regex = /^[a-zA-Z\s]{1,30}$/