Restrict an variable to allow only strings

RajathNG
Giga Contributor

How to restrict an single line text variable to allow only strings and not numaricals using client script.

1 ACCEPTED SOLUTION

Mark Roethof
Tera Patron
Tera Patron

Hi there,

 

Whats the reason for mentioning Client Script? Would Regex Validation also work for you?

 

- 2019-04-22 - Article - Service Portal Catalog Items: Regex Field Validation

- 2019-08-14 - Article - Regexes for Catalog Items Variable Validation, part 2

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

View solution in original post

2 REPLIES 2

Mark Roethof
Tera Patron
Tera Patron

Hi there,

 

Whats the reason for mentioning Client Script? Would Regex Validation also work for you?

 

- 2019-04-22 - Article - Service Portal Catalog Items: Regex Field Validation

- 2019-08-14 - Article - Regexes for Catalog Items Variable Validation, part 2

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

RajathNG
Giga Contributor

Thanks, I have created new Regex condtion as below and it worked.

 

^[A-Za-z ]+$