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) 563 B
import { setToDefaultLocale } from "./chunk-OE3L7EKN.mjs"; // src/asserts/string/contains.ts var containsErrorMessage = "The received value does not contain the required substring"; var containsErrorKey = "s:contains"; var contains = (substring) => (received, ctx) => { if (!received.includes(substring)) { ctx.addIssue(`contains '${substring}'`, received, containsErrorKey); } }; contains.key = containsErrorKey; contains.message = containsErrorMessage; setToDefaultLocale(contains); export { contains }; //# sourceMappingURL=chunk-V2J4TQR5.mjs.map