Share via


IValidationRuleViolationCollection.Add Method (String, ValidationRuleViolationSeverity, String)

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Adds a rule violation to the rule violations collection.

Namespace:  Microsoft.VisualStudio.SharePoint.Validation
Assembly:  Microsoft.VisualStudio.SharePoint (in Microsoft.VisualStudio.SharePoint.dll)

Syntax

'Declaration
Function Add ( _
    code As String, _
    severity As ValidationRuleViolationSeverity, _
    message As String _
) As IValidationRuleViolation
IValidationRuleViolation Add(
    string code,
    ValidationRuleViolationSeverity severity,
    string message
)

Parameters

  • code
    Type: System.String

    The error code to associate with the rule violation.

  • message
    Type: System.String

    The message to associate with the rule violation.

Return Value

Type: Microsoft.VisualStudio.SharePoint.Validation.IValidationRuleViolation
An object representing the rule violation that was added to the collection.

Remarks

Use this method to add rule violations without having to implement IValidationRuleViolation.

.NET Framework Security

See Also

Reference

IValidationRuleViolationCollection Interface

Add Overload

Microsoft.VisualStudio.SharePoint.Validation Namespace