bguard
Version:
**bguard** is a powerful, flexible, and type-safe validation library for TypeScript. It allows developers to define validation schemas for their data structures and ensures that data conforms to the expected types and constraints.
21 lines (19 loc) • 591 B
JavaScript
import {
setToDefaultLocale
} from "./chunk-OE3L7EKN.mjs";
// src/asserts/string/uuidV3.ts
var uuidV3ErrorMessage = "The received value is not a valid UUID v3";
var uuidV3ErrorKey = "s:uuidV3";
var uuidV3Pattern = /^[0-9a-f]{8}-[0-9a-f]{4}-3[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
var uuidV3 = () => (received, ctx) => {
if (!uuidV3Pattern.test(received)) {
ctx.addIssue("uuid v3", received, uuidV3ErrorKey);
}
};
uuidV3.key = uuidV3ErrorKey;
uuidV3.message = uuidV3ErrorMessage;
setToDefaultLocale(uuidV3);
export {
uuidV3
};
//# sourceMappingURL=chunk-TZBAW5OO.mjs.map