Avoiding line breaks in offerings using regex expression
when creating forms to offer them to the Cireson portal, how do I define the regex not to allow a line break? I cannot seem to find the correct expression.
Within the workflows of request offerings, we often generate e-mail tasks where the subject is created using different information from the request. A lot of users manage to add line breaks in the field of a form that are not obviously visible. The e-mail task cannot create a subject title when the variable contains a line break (Error sending e-mail. Exception in sending email: The specified string is not in the form required for a subject.). This causes workflows to fail.
Because the request cannot be edited afterwards, I'm not able to correct an entry and remove the line break, except if editing directly in the database. So a workflow is broken if such a line break exists somewhere in the form and an additional task cannot continue. Or I have to skip part of the workflow which is not a solution either.
What would be a correct .NET Regular Expression (advanced) when designing an offering to allow normal characters, numbers, dashes and other characters that can be part of a name, an address or other normal information but do not allow a line break. So far, I haven't found anything yet that would work.
Thanks for your help.
Ingrid
Best Answer
-
Konstantin_Slavin-Bo Customer Ninja IT Monkey ✭✭✭✭You could use the small piece of code from this thread, which also has the extra benefit of adding a character countdown to text prompts, which are larger than 1 line, i.e. has a Maximum Length of 199.
https://community.cireson.com/discussion/comment/12266/#Comment_12266
5
Answers
https://community.cireson.com/discussion/comment/12266/#Comment_12266