Custom error message at regular expression custom fields | Community
Skip to main content

Custom error message at regular expression custom fields

  • August 21, 2021
  • 4 replies
  • 0 views

Владислав

Good day.

I created custom regexp field as written here https://support.zendesk.com/hc/en-us/articles/203661866-About-custom-field-types. 

If user mistakes, then error message appears "regular expression is incorrect".

Can I make custom error message? For example, "Please type correct e-mail"

4 replies

  • August 21, 2021

Unfortunately, there isn't a way to customize the error message that Zendesk shows. What I've found to be helpful is to guide your agents into what format they should be entering in this custom field via the name of that custom field.

For instance, perhaps you could include "(Please enter valid email)" or some other helpful messaging after the end of the custom field name.

It's a small change, but one I've found personally helpful for my team in order to prevent them from ever seeing an error due to incorrect formatting, so figured it was worth sharing in case it's useful for your specific use case(s). :)


Владислав

@Chandra Robrock

ОК, another question. Is there a way to restrict system field "e-mail"? I want to forbid domain of our company. Users type "admin@company.com" often. And thus, we cannot give feedback to user, because he didn't provide real e-mail.


  • August 21, 2021

I don't believe there would be a way to accomplish this, but I haven't run into that specific use case just yet. Hopefully some other community members may be able to weigh in on that question specifically. :) 

Out of curiosity though, is there a particular reason as to why you need to store the user's email via a custom ticket field versus relying on the Ticket Requester's email as the user's email for feedback?


Владислав

@Chandra Robrock

No, in custom field we get user login at our service. My example with e-mail was just an example.

Later I discovered system e-mail field.