UNPKG

@teleturbis/js-validator

Version:

This is a simple Validator, to check Strings for valid Characters. Also you can check an Email and an IBAN. Read more: https://www.npmjs.com/package/@teleturbis/js-validator

10 lines (9 loc) 318 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function isAlphabet(value, options) { if (options === null || options === void 0 ? void 0 : options.space) { return /^[a-zA-Z\s]+$/.test(value); } return /^[a-zA-Z]+$/.test(value); } module.exports = isAlphabet;