We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Validation regex for catalog variable

Sancley
Tera Contributor

I need to create a validation Regex in the service catalog variable that only allows letters and the symbol - ,

I tried several possibilities without success.

teste.png

I appreciate any help.

2 ACCEPTED SOLUTIONS

Brad Bowman
Mega Patron

Try [a-z\-]+ with the Case Insensitive flag

BradBowman_0-1674075343905.png

 

View solution in original post

laszloballa
Administrator

This one will match only ASCII letters and the dash symbol:

/[A-Za-z-]/g

If you need to include any special characters, just add them to the character-set.

View solution in original post

4 REPLIES 4

Brad Bowman
Mega Patron

Try [a-z\-]+ with the Case Insensitive flag

BradBowman_0-1674075343905.png

 

Brad, thanks for the valuable help!

laszloballa
Administrator

This one will match only ASCII letters and the dash symbol:

/[A-Za-z-]/g

If you need to include any special characters, just add them to the character-set.

Laszlo, thanks for the valuable help!