
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
hungarian-validators
Advanced tools
A TypeScript/JavaScript library for validating Hungarian identifiers: tax numbers (adóazonosító jel), social security number (TAJ szám)
A TypeScript/JavaScript library for validating Hungarian identifiers: tax numbers (adóazonosító jel), TAJ numbers (Social Security Numbers), bank accounts, and more.
npm install hungarian-validators
Zero Dependencies - This library has no runtime dependencies, making it lightweight and fast to install.
import { validateTaxNumber, validateTaxNumberBirthDate } from 'hungarian-validators'
// Basic validation
const result = validateTaxNumber('8123456789')
if (result.isValid) {
console.log('Valid tax number')
} else {
console.error(result.error)
}
// Validation with English error messages
const resultEn = validateTaxNumber('8123456789', { language: 'en' })
// Validate tax number with birth date
const resultWithDate = validateTaxNumberBirthDate('8123456789', '1980-01-01', { language: 'en' })
import { validateSSNumber } from 'hungarian-validators'
// Basic validation
const result = validateSSNumber('111111110')
if (result.isValid) {
console.log('Valid TAJ number')
} else {
console.error(result.error)
}
// Validation with English error messages
const resultEn = validateSSNumber('111111110', { language: 'en' })
validateTaxNumber(taxNumber: string, options?: TaxNumberValidationOptions): ValidationResultValidates a Hungarian tax number (adóazonosító jel).
Parameters:
taxNumber: The tax number to validate (10 digits)options: Optional configuration
language: 'hu' | 'en' (default: 'hu')Returns:
ValidationResult object with:
isValid: booleanerror?: string (error message if invalid)Validation Rules:
validateTaxNumberBirthDate(taxNumber: string, birthDate: string | Date, options?: TaxNumberValidationOptions): ValidationResultValidates if the birth date encoding in tax number matches the actual birth date.
Parameters:
taxNumber: The tax number to validatebirthDate: Birth date in YYYY-MM-DD format or Date objectoptions: Optional configuration (same as above)validateSSNumber(ssNumber: string, options?: SSNumberValidationOptions): ValidationResultValidates a Hungarian Social Security Number (TAJ - Társadalombiztosítási Azonosító Jel).
Parameters:
ssNumber: The TAJ number to validate (9 digits)options: Optional configuration
language: 'hu' | 'en' (default: 'hu')Returns:
ValidationResult object with:
isValid: booleanerror?: string (error message if invalid)Validation Rules:
Based on 1996. évi XX. law:
import { validateTaxNumber, validateTaxNumberBirthDate, validateSSNumber } from 'hungarian-validators'
// Example 1: Basic validation
const result1 = validateTaxNumber('8123456789')
console.log(result1.isValid) // true or false
// Example 2: Validation with English messages
const result2 = validateTaxNumber('123456789', { language: 'en' })
console.log(result2.error) // "Tax number must be exactly 10 digits"
// Example 3: Validate with birth date
const result3 = validateTaxNumberBirthDate('8123456789', '1980-01-01')
// Example 4: TAJ number validation
import { validateSSNumber } from 'hungarian-validators'
const result4 = validateSSNumber('111111110')
console.log(result4.isValid) // true
This package is designed to be extended with additional Hungarian validators:
MIT
For maintainers, use the following scripts to publish new versions:
pnpm run version:patch - Bumps patch version (1.0.0 → 1.0.1), creates git commit/tag, pushes to GitHub, and creates a GitHub releasepnpm run version:minor - Bumps minor version (1.0.0 → 1.1.0), creates git commit/tag, pushes to GitHub, and creates a GitHub releasepnpm run version:major - Bumps major version (1.0.0 → 2.0.0), creates git commit/tag, pushes to GitHub, and creates a GitHub releasepnpm run version:patch:preview - Preview what the next patch version would bepnpm run publish:patch - Bumps patch version, creates GitHub release, and publishes to npmpnpm run publish:minor - Bumps minor version, creates GitHub release, and publishes to npmpnpm run publish:major - Bumps major version, creates GitHub release, and publishes to npmUsage examples:
# For a patch release (bug fixes)
pnpm run publish:patch
# For a minor release (new features, backward compatible)
pnpm run publish:minor
# For a major release (breaking changes)
pnpm run publish:major
Note:
gh).gh auth login) before running these scripts.Contributions are welcome! We appreciate any help, whether it's reporting bugs, suggesting features, or submitting Pull Requests.
Fork and clone the repository
git clone https://github.com/your-username/hungarian-validators.git
cd hungarian-validators
Install dependencies
This project uses pnpm for package management.
pnpm install
Build the project
pnpm run build
Run tests
pnpm test
Run tests in watch mode (for development)
pnpm run test:watch
Found a bug or have a feature request? Please open an issue on GitHub. Include as much detail as possible to help us understand and reproduce the problem.
We'll review your PR as soon as possible. Thank you for contributing!
FAQs
A TypeScript/JavaScript library for validating Hungarian identifiers: tax numbers (adóazonosító jel), social security number (TAJ szám)
The npm package hungarian-validators receives a total of 1 weekly downloads. As such, hungarian-validators popularity was classified as not popular.
We found that hungarian-validators demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.