AnsweredAssumed Answered

Field Validation

Question asked by BrianWoods on Feb 16, 2015
Latest reply on Feb 17, 2015 by BrianWoods

Title

Field Validation

Post

I'm trying to prevent (or at least discourage) users from entering ANY of several words in a given field. Let's suppose I'm trying to prevent people from entering conjunctions..."and", "but", "or", "for", "since", etc.   So whether they type one or multiple prohibited words, there should be an error message. 

Using the Field Validation Options for a single word, I've been successful specifying the following calculation: PatternCount( Self; "and"  = 0).

Trying to incorporate more words, it seems the Case function would be appropriate.  However, I haven't had any success:

         Case(
         PatternCount( Self; "and" = 0;
         PatternCount( Self; "but"  = 0;
         PatternCount( Self; "or"  = 0;
         PatternCount( Self; "for"  = 0;
         PatternCount( Self; "since"  = 0
         )

Any quick fixes?  Or thoughts on approaching this differently?

BTW, I've checked:

         "Only during data entry"

         "Allow user to override during data entry"

         "Display custom message if validation fails".

         "Validate only if field has been modified".

Outcomes