Using validation to control content of properties


How can I define custom pattern for text field validation? Is it possible to block user from inputting certain special characters in the form’s text field? I don’t want users to add quotes ” ” and slash / in text field because it is failing the URI encoding when using my API.


Yes you can using the Validation section of a text or password property. Right now this is the only two kinds of properties we can perform additional validation on however there is technically nothing preventing you from testing the content in the integration's javascript for additional scrutiny.

From the xMatters Web UI  here is what you can do on a text or password property


Determines whether to apply validation to the text field, based on regular expressions. If selected, the following settings become available:

  • Pattern Library: Allows you select predefined regular expression patterns or to select Custom and define your own regular expression pattern.
  • Pattern: text field you can use to define or edit a regular expression pattern. Note that you can select a predefined pattern from the Pattern Library drop-down list and then modify it to suit your needs (it will automatically be saved as a Custom pattern). For example, if you wanted the specify a string of six characters or shorter, you could select String 10 characters or shorter and then modify the expression .{0,10} in the Pattern field to .{0,6}.


Was this article helpful?
0 out of 0 found this helpful



Article is closed for comments.