Class ValueObjectErrorCodes
Namespace: AdCodicem.ValueObjects
Assembly: AdCodicem.ValueObjects.Abstractions.dll
Well-known validation error codes shared by the framework and its integrations.
public static class ValueObjectErrorCodes
Inheritance
object ← ValueObjectErrorCodes
Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Remarks
Codes are stable strings so they can safely cross process boundaries: they are surfaced in
ProblemDetails responses and can be mapped to localized messages by the consumer.
Consumers are free to define their own codes; these are only the ones the framework itself emits.
Fields
InvalidFormat
The value does not match the expected shape.
public const string InvalidFormat = "value_object.invalid_format"
Field Value
NotAKnownValue
The value does not belong to the closed set of values accepted by the type.
public const string NotAKnownValue = "value_object.not_a_known_value"
Field Value
NotParsable
The supplied text could not be converted to the underlying type.
public const string NotParsable = "value_object.not_parsable"
Field Value
OutOfRange
The value falls outside the accepted range.
public const string OutOfRange = "value_object.out_of_range"
Field Value
Required
A value was expected but none was supplied.
public const string Required = "value_object.required"
Field Value
TooLong
The value is longer than allowed.
public const string TooLong = "value_object.too_long"
Field Value
TooShort
The value is shorter than allowed.
public const string TooShort = "value_object.too_short"