Home > @skunkteam/types > MessageDetails
Individual message details with optional info about the performed validation.
Signature:
type MessageDetails = Partial<ValidationDetails> & {
path?: PropertyKey[];
context?: string;
omitInput?: boolean;
} & (
| {
kind?: undefined;
}
| {
kind: 'missing property';
property: string;
}
| {
kind: 'invalid key';
property: string;
failure: Failure;
}
| {
kind: 'invalid literal';
expected: LiteralValue | LiteralValue[];
}
| {
kind: 'invalid basic type';
expected: BasicType | BasicType[];
expectedValue?: LiteralValue;
}
| {
kind: 'length out of range';
violation: LengthViolation;
config: LengthChecksConfig;
}
| {
kind: 'input out of range';
violation: NumberViolation;
config: NumberTypeConfig;
}
| {
kind: 'pattern mismatch';
config: StringTypeConfig;
}
| {
kind: 'union';
failures: Failure[];
}
| {
kind: 'custom message';
message: string;
}
);
References: ValidationDetails, Failure, LiteralValue, BasicType, LengthViolation, LengthChecksConfig, NumberViolation, NumberTypeConfig, StringTypeConfig