OverviewWe do not want the first name to contain more than one person e.g. Bob and Jane. We do this by checking to see if the word " and " (with spaces either side of it) or if the symbol "&" (not necessarily with spaces) appears in the first name field. There are three ways of doing this.
- Create a single rule with the criteria built into one regular expression
- Create two separate rules; one with the first name containing " and " and the other with a check for "&"
- Finally you could create a single rule with two dependencies. The parent rule would be a container. This would fire for all constituents e.g. import id is not blank. There would then be two OR dependencies; one checking for " and " and the other for "&".
|1||Create the rule on the first name|
|2||Create the criteria which applies when the record agrees. In this case we are supplying our own custom regular expression. Take note of the punctuation and spacing. It needs to be exact as follows:
\ and\ |&Spaces need to be escaped by a slash so that is why we have the "\ and\ ". The pipe symbol "|" indicates alternation meaning either match on the item before or after the pipe. You can see it in use if you set up criteria that selects multiple items in the "one of..." section for code table entries.
|3||Create at least one action under the realtime validation tab.|