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) 328 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function isAlphaNumeric(str, options) { if (options === null || options === void 0 ? void 0 : options.space) { return /^[a-zA-Z0-9.\s]+$/.test(str); } return /^[a-zA-Z0-9.]+$/.test(str); } module.exports = isAlphaNumeric;