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.
Namespace: SuperOffice.Exceptions
Assembly: SoCore.dll
Syntax
public class SoValidationException : SoException
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. |
Extension Methods
EnumUtil.MapEnums<From, To>(From)