Regex Field Validation on Catalog Item does not prevent submission

GaryJHayes
Tera Guru

I have defined a Variable Validation Regex for a simple 6 digit number on my Madrid system:

find_real_file.png

This expression works fine and generates the field error:

find_real_file.png

However, when I hit the submit button the record is submitted without an error.

Other posts on this forum suggest that the submission should be prevented with an error

Is there anything else I need to do?

1 ACCEPTED SOLUTION

Hi there,

Yes it should prevent the submission. Tested this on Madrid + New York.

Are you using default SC Catalog Item widget? Catalog Item? Record Producer? Are you on Madrid or other version?

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark

---

LinkedIn

 

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

7 REPLIES 7

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Gary,

I don't think it will stop the form submission even after showing the error

why not put that regex in onSubmit and stop the form submission?

Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi Ankur, thanks for the update.

However, this article Service Portal Catalog Items: Regex Field Validation [Madrid] suggests that it should prevent submission

Hi there,

Yes it should prevent the submission. Tested this on Madrid + New York.

Are you using default SC Catalog Item widget? Catalog Item? Record Producer? Are you on Madrid or other version?

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark

---

LinkedIn

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

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

LinkedIn

Hi Mark,

I think you are correct that it is not using the default Catalog Item widget

I tested again on my developer instance and it correctly prevents submission.

Thanks