UNPKG

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.

20 lines (18 loc) 595 B
import { setToDefaultLocale } from "./chunk-OE3L7EKN.mjs"; // src/asserts/string/startsWith.ts var startsWithErrorMessage = "The received value does not start with the required substring"; var startsWithErrorKey = "s:startsWith"; var startsWith = (substring) => (received, ctx) => { if (!received.startsWith(substring)) { ctx.addIssue(`starts with '${substring}'`, received, startsWithErrorKey); } }; startsWith.key = startsWithErrorKey; startsWith.message = startsWithErrorMessage; setToDefaultLocale(startsWith); export { startsWith }; //# sourceMappingURL=chunk-S4FWDTEW.mjs.map