Validates constraints for a given feature participating in a relationship. The following are considered violations:
In a composite relationship, adding an orphan feature to the destination table without relating it to an origin feature
In 1:1 relationships, if an origin feature is already related to a destination feature, relating another feature to either of them
In 1:n relationships, relating a destination feature to more than one origin feature
To recover from an orphaned destination feature violation, simply relate it to a valid origin feature, using ArcGISFeature.relateFeature(ArcGISFeature). You can usually recover from a cardinality violation by removing the relationship between the appropriate features, using ArcGISFeature.unrelateFeature(ArcGISFeature)
Note that edit operations do not error when there are constraint violations. This allows you to recover from violations in a back office operation after applying edits or syncing, if you choose to do so. See ArcGIS Desktop Validate Features[https://desktop.arcgis.com/en/arcmap/10.3/manage-data/editing-attributes/validating-features-and-relationships-in-arcmap.htm] process here.
Note: This method makes network calls to query for the related features if they are not present locally. If you have just related the feature you are validating, you need to first call FeatureTable.updateFeature(Feature) to reflect the modified attribute value in the table. If this is not done, validation results may be incorrect.
A task that represents the asynchronous validation of relationship constraints operation. The value of the task result contains a RelationshipConstraintViolation object.