ValidationRegexField plugin
- Last UpdatedApr 24, 2025
- 4 minute read
The ValidationRegexField plugin uses a regular expression (RegEx) validator to check the value entered into a Field element. The RegEx, which can be used in Advanced Database Editor (ADE) forms, is defined in an XML file located in the %DNAInstallRoot%\ADE\config\ADE\Regex directory.
For example, the StatusInputBit RegEx has the expression set as [012]?, which means that the only valid values for StatusInputBit are none, 0, 1, or 2. Anything outside this list is not allowed.
<Regex Name="StatusInputBit" Expression="[012]?" Description="Enter 0, 1 or 2" />
The system validates the entered value using the RegEx defined in the ADERegex.xml file to ensure that the criteria are met. If there are any violations, the system generates an error to alert you to the potential problems.
The following parameters must be set for FieldPlugIn to perform the validation:
-
Name="ValidationRegexField".
-
Args="<Regex defined in ADERegex files>".
The ADERegex.xml file is located in either the %DNAInstallRoot%\ADE\config\ADE\Regex or %DNADataRoot%\ADE\config\ADE\Regex directory.
For example, the Number of Input Bits field on the Input tab of the status Row Edit dialog box uses FieldPlugIn to restrict the number of input bits that an Administrator can define for the status point.
<Field
Name="inbit_@bitwi"
RowLabel="Number of Input Bits"
.
.
DisplayWidthToUse="Minimum">
<FieldPlugIn Name="ValidationRegexField" Args = "StatusInputBit" />
</Field>
The Args is referring to a RegEx named StatusInputBit, which is defined in the ADERegex.xml file. The Expression attribute states that the valid input values are none, 0, 1, or 2. If the value is outside of these four values, the system generates a warning. Hovering the mouse pointer over the warning displays the text (tooltip) contained in the RegEx's Description attribute.
<Regex Name="StatusInputBit" Expression="[012]?" Description="Enter 0, 1 or 2" />

The system will not allow the Administrator to save the record until the issue is resolved.
The following table outlines the RegEx provided in the ADERegex.xml file.
|
Name |
Description |
|---|---|
|
AccessName |
The value may contain:
|
|
Address |
The value only allows spaces, numbers, and uppercase/lowercase English letters. |
|
AlphaNumeric |
The value only allows underscores, and alphabetic and numeric characters. |
|
AttributePosition |
The value must be between 3 and 64. |
|
Byte |
The value must be within 1 and 255. |
|
CheckTimeoutRange |
The value out of range. Please enter a value between 25 and 65535. |
|
CollectPTName |
The string must contain a table name followed by a dot, a point name, another dot, and finally the field name or an asterix. The names must not contain the following characters: ', space, ;, comma (,), [, (, %, ], ), :, |, or *. |
|
DBandPTName |
The string must contain a table name followed by a dot, then a point name. The names must not contain the following characters: ', ;, comma (,), [, (, %, ], ), :, |, or *. |
|
FileName |
The value cannot contain any space(s), or the following characters: <,>, โ, :,*, |, /,\, or ?. |
|
GeneralFloatNumber |
The value must be a float in standard decimal notation or scientific notation. |
|
GeneralName |
The value cannot contain spaces or any of the following illegal characters: ., %, *, or |. |
|
GeneralString |
The string cannot contain the following illegal characters: ', @, โ, ., space, ;, ~, comma(,), [, ], (, ), %, :, |, *, ?. |
|
GeneralStringWithWhitespaces |
The string cannot contain the following illegal characters: ', @, โ, ., ;, ~, comma(,), [, ], (, ), %, :, |, *. |
|
HexadecimalColor |
The value must be a hexadecimal color with a value starting with #. |
|
IntegerNumber |
The value must be an integer number. |
|
JSHCommandType |
The value must be either C/BASIC or SCRIPT. |
|
LegacyAORName |
The value can not contain the following illegal characters: ., %, *, or |. The value also can not exceed 31 characters in length. |
|
ListOfEmails |
Email addresses separated by commas. Only digits, English letters, and characters +, -, dashes, and dots are allowed. |
|
Location |
The value only allows spaces and uppercase/lowercase English letters. |
|
NoWhiteSpace |
The value must be any character that is not a whitespace character (spaces, tabs, line breaks). |
|
PositiveGeneralFloatNumber |
The value must be a positive float in standard decimal notation or scientific notation. |
|
PositiveIntegerNumber |
The value must be a positive integer number. |
|
PrecedenceIntegerNumber |
The value must be between 1 and 50. |
|
PubSubTopicStringRestrictions |
The value cannot contain the substring |*|. |
|
RequiredField |
This value can be any character. This is a required field. |
|
RestrictedFloatNumber |
A float value with more than 7 digits will be approximated internally. |
|
SimpleFloatNumber |
The value must be a float in standard decimal notation. |
|
SimplePositiveFloatNumber |
The value must be a positive float in standard decimal notation. |
|
SingleInteger |
The value must be a single-digit number. |
|
StatusInputBit |
Enter 0, 1, or 2. |
|
StatusOrAnalogOnly |
Only analog and status tables are allowed. |
|
Timer |
The value must consist of two digit numbers representing the hour, minute, and second, with only a single colon between the groups of numbers. For example, 00:01:00. |
|
UserOrGroupName |
The name of user or group. The value only allows uppercase/lowercase English letters. |
|
ZipCode |
The value only allows spaces, dashes, and uppercase/lowercase English letters. |