Class SoValidationException
ValidationException is thrown by the Save() methods if validation fails on an entity. Contains a string map that describes all fields and their errors. This is returned in the error object to the caller, so that they can highlight missing/bad fields to the user, with explanations.
Implements
Inherited Members
Namespace: SuperOffice.Exceptions
Assembly: SoCore.dll
Syntax
public class SoValidationException : SoException, ISerializable
Constructors
SoValidationException(StringDictionary)
Exception with many messages.
Declaration
public SoValidationException(StringDictionary messages)
Parameters
| Type | Name | Description |
|---|---|---|
| StringDictionary | messages |
Properties
Messages
The message collection.
Declaration
public StringDictionary Messages { get; }
Property Value
| Type | Description |
|---|---|
| StringDictionary |
Methods
GetMessageFor(string)
Returns any message for a given field name, or blank if no message defined.
Declaration
public string GetMessageFor(string key)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key |
Returns
| Type | Description |
|---|---|
| string | Error message, or "" blank string. |