UNPKG

validatorshield

Version:

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

15 lines (14 loc) 284 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.url = url; function url(value, _ctx) { if (typeof value !== 'string') return false; try { new URL(value); return true; } catch { return false; } }