UNPKG

validatorshield

Version:

Universal validation (frontend + backend) with TypeScript. Includes common rules and Sequelize-backed async rules (unique, exists).

9 lines (8 loc) 242 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.email = email; function email(value, _ctx) { if (typeof value !== 'string') return false; return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value); }