Unify and manage your data

DVF string functions

Learn about string functions used in a data validation function.

Use string functions in Data Validation Functions (DVF) to validate attributes that are composed of text or a combination of text and numeric characters.

String Functions

FunctionDescriptionSample
regexpThe validation function checks that the given regular expression is matched. If the validation is met, then the appropriate validation message is displayed.

This function supports the NOT conditional operator, and it works with empty values.

regexp(attributes.DoB.value,'(0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])[- /.](19|20)[0-9]{2}')
equalsThe validation function checks that the attribute value exactly matches the given condition, ignoring the case. If the validation is met, then the appropriate validation message is displayed.

This function supports the NOT conditional operator, and it works with empty values.

equals(attributes.Status.value,'Active')
equalsCaseSensitiveThe validation function checks that the attribute value exactly matches the given condition, considering the case. If the validation is met, then the appropriate validation message is displayed.

This function supports the NOT conditional operator, and it works with empty values.

equalsCaseSensitive(attributes.Status.value,'Active')
containsThe validation function checks that the attribute value contains the given value. If the validation is met, then the appropriate validation message is displayed.

This function supports the NOT conditional operator, and it works with empty values.

contains(attributes.FirstName.value,'*Act*')
containsWordStartingWithThe validation function checks that the attribute value contains words starting with the given value. If the validation is met, then the appropriate validation message is displayed.

This function supports the NOT conditional operator, and it works with empty values.

containsWordStartsWith(attributes.Status.value,'Act')
startsWithThe validation function checks that the attribute value starts with the given value. If the validation is met, then the appropriate validation message is displayed.

This function supports the NOT conditional operator, and it works with empty values.

startsWith(attributes.Status.value,'Act')
missingThe validation function checks that the given value does not exist in the attribute value. If the validation is met, then the appropriate validation message is displayed.
missing(attributes.Gender.value)
existsThe validation function checks that the attribute value exists. If the validation is met, then the appropriate validation message is displayed.
exists(attributes.Gender.value)
listEqualsThe validation function checks if the attribute value is in the given list.

The elements of the list must be separated by commas.

This function supports the NOT conditional operator, and it works with empty values.

listEquals(attributes.Address.value,'100 Marine Pkwy #275, Redwood City, CA 94065, United States', '100 Marine Pkwy')
listEqualsCaseSensitiveThe validation function checks if the attribute value is in the given list. The search for the given value is case sensitive.

The elements of the list must be separated by commas.

This function supports the NOT conditional operator, and it works with empty values.

listEqualsCaseSensitive(attributes.Address.value,'100 Marine Pkwy #275, Redwood City, CA 94065, United States', '100 Marine Pkwy')
fuzzyThe validation function checks if the attribute value is similar to the given value. This permits minor differences between the query and the intended value.

This function supports the NOT conditional operator, and it works with empty values.

fuzzy(attributes.Name.value,'Smth') 
fullTextThe validation function checks if the attribute value is exactly the same as the given value. The search for the given value is case sensitive.

This function supports the NOT conditional operator, and it works with empty values.

fullText(attributes.Name.value,'Smith')
inThe validation function checks that the attribute value exists in a list of static strings. If the validation is met then the appropriate validation message is displayed.
This function supports the NOT conditional operator, and it works with empty values.
Note: If the attribute you want to validate is a string containing commas use the function listEquals.
in(attributes.Gender.value,'Male','Female')

Regex function implementation

To use a regular expression (regex) function in a data validation function (DVF), format it correctly before applying it.

Add the caret (^) at the beginning of the expression and the dollar sign ($) at the end. For example:
^.*\s{2,}.*$
The example expression above checks whether an attribute contains two or more consecutive spaces. You can test it using any online regex tool. Sample test cases:
  • abc - This string should not return a match.
  • ab c - This string has two spaces, so it should return a match.

After testing, remove the ^ and $ characters before using the expression in your data validation function.

In regex, certain characters have special meanings: ., |, \, ?, ^, (, ), {, }, [, ], ", *, +. So if you want to use them literally in a regex function, add a backslash \ before each special character.