Grooper 23.00.0020 is available as of 5-15-2023! Check the Downloads Discussion for the release notes and to get the latest version.
Grooper 21.00.0073 is available as of 5-19-2023! Check the Downloads Discussion for the release notes and to get the latest version.
Validation Script
Hi, I would like to enhance my data validation for fields.
One way to do this would be to use Regular Expressions in the validation. One simple example would be to validate using a regular expression. This is just a sample the actual expression will more than likely have more complexity.

The Regex class is found in the .net library "System.Text.RegularExpression".
Src: https://docs.microsoft.com/en-us/dotnet/api/system.text.regularexpressions.regex?view=netframework-4.7.2
How do I include a reference to this library, so I can use it for validation?
Also it may make sense to encapsulate some of the more complex checks in a function that I can re-use in multiple fields.
Where do I write this function and how do I reference it in the individual fields validation scripts?
Example of a function that looks for how many 'unusual' characters are in a field value (simplified) and declares it invalid if there are more than three.
Public Function TestValidationUnusualCharacters(input as String)
Return input.ToCharArray().Count(function(c) {"|","%","^"}.Contains(c)) <= 3
End Function

The Regex class is found in the .net library "System.Text.RegularExpression".
Src: https://docs.microsoft.com/en-us/dotnet/api/system.text.regularexpressions.regex?view=netframework-4.7.2
How do I include a reference to this library, so I can use it for validation?
Also it may make sense to encapsulate some of the more complex checks in a function that I can re-use in multiple fields.
Where do I write this function and how do I reference it in the individual fields validation scripts?
Example of a function that looks for how many 'unusual' characters are in a field value (simplified) and declares it invalid if there are more than three.
Public Function TestValidationUnusualCharacters(input as String)
Return input.ToCharArray().Count(function(c) {"|","%","^"}.Contains(c)) <= 3
End Function
0
Comments
Product Manager
[email protected]