{"_id":"@argena/global-validator","_rev":"2-c34ddf6e5b76e012d5aa763b4abea563","name":"@argena/global-validator","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@argena/global-validator","version":"1.0.0","keywords":["validator","validation","typescript","javascript","email-validator","phone-validator","iban-validator","passport-validator","tax-id-validator","national-id-validator","form-validation","security","sanitizer","formatter","localization","i18n","global-validator"],"author":{"name":"Argena Tech Labs"},"license":"MIT","_id":"@argena/global-validator@1.0.0","maintainers":[{"name":"argenatechlabs","email":"argenatechlabs@gmail.com"}],"homepage":"https://github.com/argenatechlabs/global-validator#readme","bugs":{"url":"https://github.com/argenatechlabs/global-validator/issues"},"dist":{"shasum":"ab5540a2aeb77ca77070a8d161f0c46f84563a2d","tarball":"https://registry.npmjs.org/@argena/global-validator/-/global-validator-1.0.0.tgz","fileCount":7,"integrity":"sha512-vrM1S743xU7A8J0JIzCp/G7XQlL6OLTfOoOxZm3Qu2yeLuzfBathOXj+TvsXtnaKYvQVSH40ZBv4TFqjuJh9OA==","signatures":[{"sig":"MEYCIQD0G/xtiAXiRESaFOujfS/2cKIQ8ku/7oEwL1d0v4vISwIhAMNbDW1op3KlSRthUWdy3F9sj91KWzgHS4fi6XwAR1rp","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":228030},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"59d46e3c469bd3ce260906b0d1fac04cd034f8b1","scripts":{"dev":"tsup src/index.ts --format esm,cjs --dts --watch","test":"vitest","build":"tsup src/index.ts --format esm,cjs --dts --clean","test:run":"vitest run","prepublishOnly":"npm run build && npm run test:run"},"_npmUser":{"name":"argenatechlabs","email":"argenatechlabs@gmail.com"},"repository":{"url":"git+https://github.com/argenatechlabs/global-validator.git","type":"git"},"_npmVersion":"11.13.0","description":"Global validation, formatting, security, localization and form toolkit for TypeScript and JavaScript.","directories":{},"sideEffects":false,"_nodeVersion":"24.16.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.2.4","vitest":"^3.2.4","typescript":"^5.8.3"},"_npmOperationalInternal":{"tmp":"tmp/global-validator_1.0.0_1782083502217_0.6498481687133111","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@argena/global-validator","version":"1.0.1","description":"Global validation, formatting, security, localization and form toolkit for TypeScript and JavaScript.","license":"MIT","author":{"name":"Argena Tech Labs"},"type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"sideEffects":false,"homepage":"https://github.com/argenatechlabs/global-validator#readme","repository":{"type":"git","url":"git+https://github.com/argenatechlabs/global-validator.git"},"bugs":{"url":"https://github.com/argenatechlabs/global-validator/issues"},"keywords":["validator","validation","typescript","javascript","email-validator","phone-validator","iban-validator","passport-validator","tax-id-validator","national-id-validator","form-validation","security","sanitizer","formatter","localization","i18n","global-validator"],"scripts":{"dev":"tsup src/index.ts --format esm,cjs --dts --watch","build":"tsup src/index.ts --format esm,cjs --dts --clean","test":"vitest","test:run":"vitest run","prepublishOnly":"npm run build && npm run test:run"},"engines":{"node":">=18"},"publishConfig":{"access":"public"},"devDependencies":{"tsup":"^8.2.4","typescript":"^5.8.3","vitest":"^3.2.4"},"gitHead":"03b8fa271c68ce3adb38c92df039127f20041052","_id":"@argena/global-validator@1.0.1","_nodeVersion":"24.16.0","_npmVersion":"11.13.0","dist":{"integrity":"sha512-fu4de79haGDnL78yNbm+Zm4R4SEe1kTuCU7lFovKNZVlzCd0Y5q6Un1vT+f/AMmUHJPDcurK5wvgqwmYa/AcXg==","shasum":"8be8cf042ac472e253871d15a2f41d0a957a2501","tarball":"https://registry.npmjs.org/@argena/global-validator/-/global-validator-1.0.1.tgz","fileCount":7,"unpackedSize":235250,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCBcTzvAZAI4tqYBcQPyORoP9ZCLSWbeuJoPWrGV0lgMwIhAMbHnIMUbirzjbbqSnoDIu+XC10AMP4sS4TwNCYw8ZXX"}]},"_npmUser":{"name":"argenatechlabs","email":"argenatechlabs@gmail.com"},"directories":{},"maintainers":[{"name":"argenatechlabs","email":"argenatechlabs@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/global-validator_1.0.1_1782087891506_0.1142685899649949"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-21T23:11:42.072Z","modified":"2026-06-22T00:24:52.081Z","1.0.0":"2026-06-21T23:11:42.355Z","1.0.1":"2026-06-22T00:24:51.645Z"},"bugs":{"url":"https://github.com/argenatechlabs/global-validator/issues"},"author":{"name":"Argena Tech Labs"},"license":"MIT","homepage":"https://github.com/argenatechlabs/global-validator#readme","keywords":["validator","validation","typescript","javascript","email-validator","phone-validator","iban-validator","passport-validator","tax-id-validator","national-id-validator","form-validation","security","sanitizer","formatter","localization","i18n","global-validator"],"repository":{"type":"git","url":"git+https://github.com/argenatechlabs/global-validator.git"},"description":"Global validation, formatting, security, localization and form toolkit for TypeScript and JavaScript.","maintainers":[{"name":"argenatechlabs","email":"argenatechlabs@gmail.com"}],"readme":"# 🌍 Argena Global Validator\n\n<div align=\"center\">\n\nGlobal Validation • Formatting • Security • Localization Toolkit\n\nTypeScript & JavaScript için dünyanın her yerinde kullanılabilecek profesyonel doğrulama paketi.\n\n![npm](https://img.shields.io/npm/v/@argena/global-validator)\n![downloads](https://img.shields.io/npm/dm/@argena/global-validator)\n![license](https://img.shields.io/npm/l/@argena/global-validator)\n![typescript](https://img.shields.io/badge/TypeScript-Ready-blue)\n![coverage](https://img.shields.io/badge/Tested-Vitest-green)\n\n</div>\n\n---\n\n# 🚀 Why Argena Global Validator?\n\nMost validator libraries only validate.\n\n**Argena Global Validator validates, formats, localizes, sanitizes, documents and teaches.**\n\nBuilt for:\n\n* SaaS Platforms\n* Enterprise Applications\n* Government Systems\n* Banking Applications\n* E-Commerce\n* CRM Systems\n* ERP Systems\n* Mobile Applications\n* React / Next.js Projects\n* Node.js APIs\n\n---\n\n# ✨ Features\n\n## Validation\n\n### Identity\n\n* National ID Validation\n* Tax ID Validation\n* Passport Validation\n\n### Contact\n\n* Email Validation\n* Phone Validation\n* URL Validation\n\n### Financial\n\n* IBAN Validation\n* Credit Card Validation\n* Luhn Validation\n\n### Files\n\n* File Validation\n* MIME Type Validation\n* Extension Validation\n* File Size Validation\n\n### Authentication\n\n* Password Validation\n* Password Strength Analysis\n* Username Validation\n\n### Forms\n\n* Single Field Validation\n* Multi Field Validation\n* Form Schema Validation\n\n---\n\n# 🌎 Supported Countries\n\n| Country | Phone | Postal Code | IBAN | National ID | Tax ID | Passport |\n| ------- | ----- | ----------- | ---- | ----------- | ------ | -------- |\n| TR      | ✅     | ✅           | ✅    | ✅           | ✅      | ✅        |\n| US      | ✅     | ✅           | ❌    | ❌           | ❌      | ✅        |\n| GB      | ✅     | ✅           | ✅    | ❌           | ❌      | ✅        |\n| DE      | ✅     | ✅           | ✅    | ❌           | ❌      | ✅        |\n| FR      | ✅     | ✅           | ✅    | ❌           | ❌      | ✅        |\n| IT      | ✅     | ✅           | ✅    | ❌           | ❌      | ✅        |\n| ES      | ✅     | ✅           | ✅    | ❌           | ❌      | ✅        |\n| RU      | ✅     | ✅           | ❌    | ❌           | ❌      | ✅        |\n| UA      | ✅     | ✅           | ✅    | ❌           | ❌      | ✅        |\n| AZ      | ✅     | ✅           | ✅    | ❌           | ❌      | ✅        |\n\nMore countries coming soon.\n\n---\n\n# 🌐 Supported Languages\n\n* English\n* Türkçe\n* Deutsch\n* Français\n* Español\n* Italiano\n* Русский\n* Українська\n* Azərbaycanca\n\n---\n\n# 📦 Installation\n\n## npm\n\n```bash\nnpm install @argena/global-validator\n```\n\n## pnpm\n\n```bash\npnpm add @argena/global-validator\n```\n\n## yarn\n\n```bash\nyarn add @argena/global-validator\n```\n\n---\n\n# ⚡ Quick Start\n\n```ts\nimport { validate } from \"@argena/global-validator\";\n\nconst result = validate(\"test@example.com\", {\n  type: \"email\",\n  locale: \"en\"\n});\n\nconsole.log(result);\n```\n\nOutput:\n\n```ts\n{\n  valid: true,\n  type: \"email\",\n  normalized: \"test@example.com\",\n  message: \"Valid email address.\"\n}\n```\n\n---\n\n# 📧 Email Validation\n\n```ts\nimport { validateEmail } from \"@argena/global-validator\";\n\nvalidateEmail(\"test@example.com\", \"en\");\n```\n\n---\n\n# 📱 Phone Validation\n\nTurkey\n\n```ts\nvalidatePhone(\n  \"05551112233\",\n  \"TR\",\n  \"tr\"\n);\n```\n\nUnited States\n\n```ts\nvalidatePhone(\n  \"+12125551234\",\n  \"US\",\n  \"en\"\n);\n```\n\nGermany\n\n```ts\nvalidatePhone(\n  \"+4915112345678\",\n  \"DE\",\n  \"de\"\n);\n```\n\n---\n\n# 🏦 IBAN Validation\n\n```ts\nvalidateIBAN(\n  \"TR330006100519786457841326\",\n  \"tr\"\n);\n```\n\n```ts\nvalidateIBAN(\n  \"DE89370400440532013000\",\n  \"de\"\n);\n```\n\n---\n\n# 🪪 Passport Validation\n\n```ts\nvalidatePassport(\n  \"U12345678\",\n  \"TR\",\n  \"tr\"\n);\n```\n\n---\n\n# 🔐 Password Validation\n\n```ts\nvalidatePassword(\n  \"Argena123!\",\n  {\n    requireSpecial: true,\n    minLength: 8,\n    locale: \"tr\"\n  }\n);\n```\n\nResult:\n\n```ts\n{\n  valid: true,\n  score: 85,\n  level: \"very-strong\"\n}\n```\n\n---\n\n# 👤 Username Validation\n\n```ts\nvalidateUsername(\n  \"argena.tech\",\n  {\n    locale: \"tr\",\n    allowDot: true\n  }\n);\n```\n\n---\n\n# 📄 Form Validation\n\n```ts\nvalidateForm(\n  {\n    email: \"test@example.com\",\n    phone: \"05551112233\",\n    username: \"argena.tech\"\n  },\n  {\n    email: \"email\",\n    phone: {\n      type: \"phone\",\n      country: \"TR\"\n    },\n    username: {\n      type: \"username\"\n    }\n  },\n  {\n    locale: \"tr\",\n    country: \"TR\"\n  }\n);\n```\n\n---\n\n# 🎨 Formatters\n\n## Phone\n\n```ts\nformatPhone(\n  \"05551112233\",\n  \"TR\"\n);\n\n// +90 555 111 22 33\n```\n\n## IBAN\n\n```ts\nformatIBAN(\n  \"TR330006100519786457841326\"\n);\n\n// TR33 0006 1005 1978 6457 8413 26\n```\n\n## Currency\n\n```ts\nformatCurrency(\n  1500,\n  {\n    country: \"TR\",\n    locale: \"tr\"\n  }\n);\n```\n\nOutput:\n\n```txt\n₺1.500,00\n```\n\n## Date\n\n```ts\nformatDate(\n  new Date(),\n  {\n    locale: \"tr\",\n    dateStyle: \"long\"\n  }\n);\n```\n\n---\n\n# 🛡 Security Helpers\n\n## Email Masking\n\n```ts\nmaskEmail(\n  \"osman@example.com\"\n);\n\n// o********n@example.com\n```\n\n## Phone Masking\n\n```ts\nmaskPhone(\n  \"05551112233\",\n  \"TR\"\n);\n\n// +90 555 **** 33\n```\n\n## Sanitize Text\n\n```ts\nsanitizeText(\n  \"<script>alert(1)</script>Hello\"\n);\n\n// Hello\n```\n\n## Escape HTML\n\n```ts\nescapeHTML(\n  \"<div>Hello</div>\"\n);\n\n// &lt;div&gt;Hello&lt;/div&gt;\n```\n\n---\n\n# 📚 Guide System\n\nOne of the most unique features.\n\nGenerate country-specific documentation directly from the library.\n\n```ts\nimport { getGuide } from \"@argena/global-validator\";\n\ngetGuide({\n  country: \"TR\",\n  locale: \"tr\"\n});\n```\n\n```ts\ngetGuide({\n  country: \"DE\",\n  locale: \"de\"\n});\n```\n\n```ts\ngetGuide({\n  country: \"AZ\",\n  locale: \"az\"\n});\n```\n\n---\n\n# 🧪 Testing\n\n```bash\nnpm run test\n```\n\nCoverage includes:\n\n* Email\n* Phone\n* Postal Code\n* IBAN\n* Passport\n* National ID\n* Password\n* Username\n* Security Helpers\n* Formatters\n* Guides\n* Examples\n* Forms\n\n---\n\n# 🏗 Roadmap\n\n## v1.1\n\n* JSON Schema Generator\n* Zod Adapter\n* React Hook Form Adapter\n* Vue Form Adapter\n\n## v1.2\n\n* 50+ Countries\n* 20+ Languages\n* Banking Validation Suite\n\n## v2.0\n\n* AI Generated Validation Rules\n* Dynamic Country Packs\n* Enterprise Validation Engine\n\n---\n\n# 🤝 Contributing\n\nPull requests, suggestions and issues are welcome.\n\n---\n\n# 📄 License\n\nMIT License\n\nCopyright © Argena Tech Labs\n\n---\n\nMade with ❤️ by Argena Tech Labs\n","readmeFilename":"README.md"}