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.

19 lines (14 loc) 754 B
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); var _chunkTJQ5NVL4js = require('./chunk-TJQ5NVL4.js'); // src/asserts/string/atLeastOneDigit.ts var digitRegExp = /\d/; var atLeastOneDigitErrorMessage = "The received value does not contain at least one digit"; var atLeastOneDigitErrorKey = "s:atLeastOneDigit"; var atLeastOneDigit = () => (received, ctx) => { if (!digitRegExp.test(received)) ctx.addIssue("at least one digit", received, atLeastOneDigitErrorKey); }; atLeastOneDigit.key = atLeastOneDigitErrorKey; atLeastOneDigit.message = atLeastOneDigitErrorMessage; _chunkTJQ5NVL4js.setToDefaultLocale.call(void 0, atLeastOneDigit); exports.atLeastOneDigit = atLeastOneDigit; //# sourceMappingURL=chunk-Y54K6TQO.js.map