Regex validator

Regex

Ingredient Family: validationIngredients

Outline Display: A regex validator that matches {{columnName}} against {{regex}} and shows the message {{message}} on a non-match

Local scope

The parent slot binds these (look up the slot in the parent to see how):

  • $table – The table to validate

Settings

Required

  • columnName : column of $table (type filter: exactly text; required, non-nullable (optional or required))
    The column we’re matching to the regex

  • regex : constant value (type: text; required, non-nullable)
    The regex that this column must match in order to be valid. The browser and the server run it on the same engine (RE2), so it means the same thing in both: \d, \w, \s and non-greedy quantifiers work; lookahead, lookbehind and backreferences do not. Anchor it with ^ and $ to constrain the whole value. A repetition bound may be at most 1000 and counts characters.

  • message : constant value (type: text; required, non-nullable)
    A message to display to the user when their text is invalid.