IValidate Interface

Provides access to members to validate individual features.

Description

The IValidateinterface can be used to validate individual features and objects from geodatabase feature classes and tables.

Members

Name Description
Method GetInvalidFields Returns all invalid fields.
Method GetInvalidRules The set of all invalid rules.
Method GetInvalidRulesByField The set of all invalid rules for the specified field.
Method Validate Validates the row.

IValidate.GetInvalidFields Method

Returns all invalid fields.

Public Function GetInvalidFields ( _
) As IFields
public IFields GetInvalidFields (
);

Description

The GetInvalidFieldsmethod returns a field set containing the row's invalid fields.

IValidate.GetInvalidRules Method

The set of all invalid rules.

Public Function GetInvalidRules ( _
) As IEnumRule
public IEnumRule GetInvalidRules (
);

Description

The GetInvalidRules method returns an enumerator of rules that are currently violated by the row.

IValidate.GetInvalidRulesByField Method

The set of all invalid rules for the specified field.

Public Function GetInvalidRulesByField ( _
    ByVal FieldName As String _
) As IEnumRule
public IEnumRule GetInvalidRulesByField (
    string FieldName
);

Description

The GetInvalidRulesByField method returns an enumerator of rules violated by the specified field of the row.

IValidate.Validate Method

Validates the row.

Public Function Validate ( _
    ByRef ErrorMessage As String _
) As Boolean
public bool Validate (
    ref string ErrorMessage
);

Description

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.

Remarks

Validate on a row occurs in five steps:

  1. Validate the subtype

  2. Validate the attribute rules

  3. Validate the network connectivity rules (if network feature)

  4. Validate the relationship rules

  5. 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.

Classes that implement IValidate

Classes Description
Feature Esri Feature.

Remarks

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.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.