ValidationModel Structure
Represents information returned when an attempt to validate a model was made.
Namespace: MobileTrack.Common.ModelsAssembly: MobileTrack.Common (in MobileTrack.Common.dll) Version: 0.7+ce90b2cf6b782b8d7b7fd47b3c546987c652c00f
public readonly struct ValidationModel : IEquatable<ValidationModel>
- Inheritance
- Object ValueType ValidationModel
- Implements
- IEquatableValidationModel
This model is created because we don't want to throw exceptions if the user makes an error;
user errors should be caught with models like these, exceptions are to be used for technical malfunctions,
illegal operations or other unexpected behaviors.
The
StatusCode tells us what the issue is, the
I18nKey is a localization key to a human-readable message,
and
Property tells us which property is causing issues.
If no error is found, the
StatusCode will be '
Ok'. In this case, the other properties
should be ignored.
| IsError |
Whether an error was found.
|
| I18nKey |
The I18nKey representing the issue the validator found. (if applicable)
|
| Ok |
Represents a successful validation.
|
| Property |
Property of the failed item. Can be left empty if 'OK'.
|
| StatusCode |
The status code return when exiting the model validator.
If it is not 'Ok' there is a problem present.
|