On the Validation tab of the Property Definition Properties dialog, you can define the criteria that the values of a specific property should meet. For example, with validation you can ensure that the property value contains a required number of characters. In this way, you can verify that the customer phone number or invoice number is added correctly on the metadata card. You can also validate that, for instance, the value can be accepted in relation to other properties or that the value is not empty.
Validation is specified by using variables, generic features of VBScript, and M-Files API. The following M-Files variables can be used for validating property values: PropertyDef, PropertyValue, ObjVer, DisplayID, Vault, CurrentUserID, CurrentUserSessionInfo, VaultSharedVariables, SavepointVariables, TransactionCache, MFScriptCancel, GetExtensionObject, MasterTransactionID, CurrentTransactionID, ParentTransactionID. For more information about the variables, refer to VBScript Variables Explained.
Complete the following steps to add value validation for a property: