Model validation is provided to ensure common modeling mistakes are avoided, naming conventions are used, constraints exist, and data exists for the data model.

To validate, use either the Validate > Validate Model menu, or open the Validation tab and click on the Validate button. When run, validation findings will appear in the Validation side window, and validation icons will appear on the data model in the Canvas. To reset the validation information, use the Validate > Clear Validation menu item, or the Clear Validation button.

After validation, an overall validation icon will appear at the top. Validation information for each section will be presented, and each section header will contain a validation icon. Each section is expandable and collapsible, and when expanded will show the detailed line items about what validations have passed and which have failed. Each line item also has a validation icon indicating it’s status.

The validation icons are:

  • Green check: Validation passed

  • Orange triangle: Validation issue

  • Red X: Validation error (validation couldn’t run)

  • Blue circle: Validation skipped

The following actions can be performed in the validation section:

  • Click line item: highlights the item(s) in the canvas

  • Click square icon in header: highlights all associated item(s) in the canvas

  • Check box in header: enables/disables the validation section

  • Filter box: Enables filtering of the validations. Click the 'x' to see all validations again.

Validation information will be shown in the canvas as follows:

  • Green check: indicates item passed validation

  • Orange triangle: indicates an issue with the item

  • Count glyph: if connected to a database, indicates how many items have been found. If 0, count is shown in orange. If greater than 0, count is shown in green.

Clicking on an item will Filter the validation list. The specific validation sections are discussed below.

Static Validation

There are four types of static validation that are performed on the data model:

  • Data Model Names: Validates that all Node Labels, Relationship Types, and Properties have names.

  • Node Label Properties: Validates that all primary Node Labels have at least 1 property.

  • Node Label Node Keys: Validates that all primary Node Labels have a Node Key.

  • Node Relationship Types: Validates that all Node Labels have at least 1 relationship.

  • Conforms to Style Guide: Validates that items in the data model conform to the Neo4j Style Guide. Specifically:

    • Node Labels are styled in CamelCase where the first letter of each word begins with a capital letter.

    • Relationship Types are styled with all upper-case and use the underscore between words.

    • Property names are styled in camelCase where the first letter of the component begins with a lower-case letter, and the first letter of each following word is a capital letter.

Validation against a Neo4j Database

If you are connected to a Neo4j Database, the following additional validations will run:

  • Validate Node Labels Against Database: For each Node Label in the data model, checks the database to ensure that nodes with that Node Label exist. If there are no nodes, a validation warning is shown.

  • Validate Relationship Types Against Database: For each Relationship Type in the data model, checks the database to ensure that relationships with that Relationship Type exist between the given Node Labels. If there are no relationships, a validation warning will be shown.

  • Validate Constraints Against Database: For properties marked as Node Key, Unique, and Must Exist, confirms that those constraints exist in the database.

  • Validate Indexes Against Database: For properties marked as Indexed, and for Composite Indexes confirms that those indexes exist in the database.