Validation Rules

NI InsightCM™ SDK 3.3 Help

Edition Date: December 2018

Part Number: 375191F-01

»View Product Info
Download Help (Windows Only)

Parent Topic: Device Type Definitions

Validation rules instruct the InsightCM web application to provide feedback to users when they configure a property field with invalid values. For example, you might want to alert users to required fields that they left empty or to conflicts they introduced between two related properties. If a property value violates the validation rule, the InsightCM web application applies visual styling to the property field and, optionally, prevents users from saving the device configuration.

Note  This definition is one part within the device type definition structure. In other words, when you export and import a device type definition, this definition is included.

You can classify a validation rule as a warning or an error depending on whether you want to allow users to save a device configuration that violates the validation rule.

  • Warning—Display a red underline in the property field and display a tip strip that contains a custom message when users hover over the field.
  • Error—Prevent users from saving the device configuration and display a line and tip strip on the field.

Components of a Validation Rule

You can define validation rules in the device definition or in asset definitions. Validation rules in JSON are objects that contain the following name-value pairs:

Related Information

UX Rules

WAS THIS ARTICLE HELPFUL?

Not Helpful