Class ValidationErrorCollection

A collection of ValidationError objects that is used to collect errors that occur duing calls to the Validate method.

System.Object
  System.Collections.CollectionBase
    Westwind.Utilities.ValidationErrorCollection
public class ValidationErrorCollection : CollectionBase

Class Members

MemberDescription

Constructor

Add

Adds a new error to the collection

public void Add(ValidationError Error)

public void Add(string Message,     string FieldName,     string ID)

AddFormat

Like Add but allows specifying of a format

public void AddFormat(string Message,     string FieldName,     string ID,     Object[] arguments)

Assert

Adds a validation error if the condition is true. Otherwise no item is added.

public bool Assert(bool Condition,     string Message,     string FieldName,     string ID)

public bool Assert(bool Condition,     string Message)

public bool Assert(bool Condition,     string Message,     string FieldName)

public bool Assert(bool Condition,     ValidationError Error)

Remove

Removes the item specified in the index from the Error collection

public void Remove(int Index)

ToHtml

Returns an HTML representation of the errors in this collection. The string is returned as an HTML unordered list.

public string ToHtml()

ToString

Returns a string representation of the errors in this collection. The string is separated by CR LF after each line.

public virtual string ToString()

Item

Requirements

Namespace: Westwind.Utilities
Assembly: westwind.utilities.dll

© West Wind Technologies, 1996-2016 • Updated: 12/12/15
Comment or report problem with topic