ViraStack
  • Academy
  • About
  • Support
HomeGet StartedExamples
ViraStack

A frontend ecosystem: free guides, project templates, AI rules, and form components.

Products

  • ViraStack Start
  • ViraStack AI
  • ViraStack Mask
  • ViraStack Password
  • ViraStack Guide

Explore

  • Academy
  • About
  • Brand
  • Support

© 2026 ViraStack.

Open source · MIT

Examples

  • All
  • Card
  • Credit card form
  • Currency
  • Custom mask (plate)
  • CVV
  • Date
  • Expiry
  • IBAN
  • Number
  • Password and PIN
  • Phone
  • Tax number (VKN)
  • TCKN

Tax number (VKN)

10-digit Turkish tax number, checked with the VKN algorithm.

← All examples·vkn

Built-in validation: VKN algorithm

The last digit is checked with the Turkish Revenue Administration's tax number algorithm; the error is vkn.invalid.

Preview

Form value: -

Display: -

import { useForm } from "react-hook-form"
import { useViraMask } from "@virastack/mask"
 
function Example() {
  const form = useForm<{ vkn: string }>()
  const { vkn } = useViraMask(form, { vkn: "vkn" })
 
  return <input {...vkn} placeholder="1234567890" />
}

Details

  • Pattern: 9999999999
  • Preset: "vkn"
  • Form value: "1234567890"
  • Error keys: vkn.incomplete, vkn.invalid

For the hook API see useViraMask(); for your own pattern see custom mask.

PreviousPhoneNextTCKN

On this page

  • Preview
  • Details
Something wrong? Fix it