Add Masked Input Property for Check Syntax Validation
- Last UpdatedNov 15, 2023
- 1 minute read
The following code represents how to add the "Mask" property along with the other common properties for check syntax validation.
(function ()
{
var standardControlMembers = skelta.forms.constants.controlsCollection;
var genericControlFunctions = skelta.forms.constants.controlFunctions;//genericControlFunctions
has properties - nonContainerFunctions and containerFunctions which is a collection
of function names [{ name: "functionName"}]
var maskedInputMembers = {
functions: genericControlFunctions.nonContainerFunctions,//.concat([{ name: "functionName" }
isContainerControl: false,
controlType: "MaskedInput",
properties: [{ propertyName: "xmlNodeBoundTo", propertyType: "2", isWritable: false },
{ propertyName: "tagName", propertyType: "0", isWritable: true },
{ propertyName: "id", propertyType: "2", isWritable: false },
{ propertyName: "value", propertyType: "0", isWritable: true },
{ propertyName: "isMandatory", propertyType: "0", isWritable: true },
{ propertyName: "readOnly", propertyType: "0", isWritable: true },
{ propertyName: "enable", propertyType: "0", isWritable: true },
{ propertyName: "mask", propertyType: "2", isWritable: false },
{ propertyName: "visible", propertyType: "0", isWritable: true }]
}
standardControlMembers.push(maskedInputMembers);
})();
In the example, the "Mask" property is a nonobservable variable and is a readonly property, indicated by propertyType: "2" and isWritable: false in the above code.
For more information on the usage of the above code, see Adding Custom Controls for Check Syntax Validation.