Provides access to members to validate individual features.
The IValidateinterface can be used to validate individual features and objects from geodatabase feature classes and tables.
|GetInvalidFields||Returns all invalid fields.|
|GetInvalidRules||The set of all invalid rules.|
|GetInvalidRulesByField||The set of all invalid rules for the specified field.|
|Validate||Validates the row.|
Returns all invalid fields.
Public Function GetInvalidFields ( _ ) As IFields
public IFields GetInvalidFields ( );
The GetInvalidFieldsmethod returns a field set containing the row's invalid fields.
The set of all invalid rules.
Public Function GetInvalidRules ( _ ) As IEnumRule
public IEnumRule GetInvalidRules ( );
The GetInvalidRules method returns an enumerator of rules that are currently violated by the row.
The set of all invalid rules for the specified field.
Public Function GetInvalidRulesByField ( _ ByVal FieldName As String _ ) As IEnumRule
public IEnumRule GetInvalidRulesByField ( string FieldName );
The GetInvalidRulesByField method returns an enumerator of rules violated by the specified field of the row.
Validates the row.
Public Function Validate ( _ ByRef ErrorMessage As String _ ) As Boolean
public bool Validate ( ref string ErrorMessage );
The Validate method indicates whether the row is violating any of its class's rules. A return value of true indicates the row is valid, while a return value of false indicates the row is violating one or more rules.
Validate on a row occurs in five steps:
Validate the subtype
Validate the attribute rules
Validate the network connectivity rules (if network feature)
Validate the relationship rules
Perform custom validation (using optional class extension)
The validate process stops once a row is found invalid. For example, if a network feature violates an attribute rule, the validation process stops and the feature's network connectivity rules are not evaluated until the attribute rule violation is corrected.
The IValidateinterface is used to test a row against the geodatabase rules defined for its object class. While the IValidationinterface will validate a whole set of rows at once, IValidateoperates on just one row; this can be useful if you want to validate the row immediately. IValidatealso offers more detailed information on the failures; the Validatemethod returns an error message, and the other methods help identify what is wrong.
IValidate is not implemented by attributed relationships.