Share via


IFeatureValidationRule Interface

Definition

Represents a rule to apply when validating a Feature in a SharePoint project.

public interface class IFeatureValidationRule
public interface IFeatureValidationRule
type IFeatureValidationRule = interface
Public Interface IFeatureValidationRule

Examples

Date History Reason
May 2010 Added new remarks with links to topics that show how to implement this interface Information enhancement.

Remarks

Implement the IPackageValidationRule interface to define a custom validation rule to help verify that a package in a SharePoint project is valid. For more information, see How to: Create Custom Feature and Package Validation Rules for SharePoint Solutions.

Classes that implement this interface must include the System.ComponentModel.Composition.ExportAttribute to be discovered by the project system.

Methods

ValidateFeature(IFeatureValidationContext)

Determines whether a feature currently violates the rule.

ValidateProjectItem(IFeatureValidationContext, ISharePointProjectItem)

Determines whether a feature would violate the rule if the specified project item is added.

Applies to