Examples of String Functions

String functions are used in a data validation function.

Table 1. String Functions
Function Description Sample
regexp The validation function checks that the given regular expression is matched. If the validation is met then the appropriate validation message is displayed.
regexp(attributes.DoB.value,'(0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])[-
        /.](19|20)[0-9]{2}')
equals The validation function checks that the attribute value exactly matches the given condition and while doing so, it ignores the case. If the validation is met then the appropriate validation message is displayed.
equals(attributes.Status.value,'Active')
equalsCaseSensitive The validation function checks that the attribute value exactly matches the given condition and while doing so, it considers the case. If the validation is met then the appropriate validation message is displayed.
equalsCaseSensitive(attributes.Status.value,'Active')
contains The validation function checks that the attribute value contains the given value. If the validation is met then the appropriate validation message is displayed.
contains(attributes.Status.value,'Act')
containsWordStartingWith The 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.
containsWordStartsWith(attributes.Status.value,'Act')
startsWith The validation function checks that the attribute value starts with the given value. If the validation is met then the appropriate validation message is displayed.
startsWith(attributes.Status.value,'Act')
missing The 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)
exists The validation function checks that the attribute value exists. If the validation is met then the appropriate validation message is displayed.
exists(attributes.Gender.value)
in The 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.
in(attributes.Gender.value,'Male','Female')