public interface IPluginValidationRule extends IFCPlugin
Each validation rule specifies a (JavaScript) regular expression that is checked against the value of the text input field. When the regular expression does not match, the value is considered invalid. Each validation rule must also specify an error message that is shown to the user in case the value is invalid.
CONFIG_FILENAME
ATTR_NAME, COL_NAME
ATTR_DISPLAY_NAME
Modifier and Type | Method and Description |
---|---|
String |
getKey() |
String |
getKeyDisplayName(Locale locale) |
String |
getRegex()
This must return the JavaScript regular expression that check whether the value of form field is valid.
|
String |
getValidationErrorMsg(Locale locale) |
getDescription, getDescription, getDisplayName, getName, initialize, initPlugin, install, shutdown, shutdown, uninstall
String getKey()
IPluginValidationRule
.String getKeyDisplayName(Locale locale)
locale
- The current locale of the designer.String getRegex()
/^(?=[-0-9xX ]{13}$)(?:[0-9]+[- ]){3}[0-9]*[xX0-9]$/Furthermore, you usually want to the include the start-of-string marker
^
and end-of-string marker
$
to make sure the regular expression matches the entire string, not only a part of it
The value of a form field is considered valid if this regular expression matches that value; and invalid otherwise. When the value of a form field is invalid, an appropriate error message is shown to the user.
Copyright © 2021 XIMA MEDIA GmbH. All rights reserved.