Skip to content

🇸🇪 Add validation for Swedish personal identity numbers to Yup

License

Notifications You must be signed in to change notification settings

davidohlin/yup-personnummer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yup-personnummer Build Status

Adds validation for Swedish personal identity numbers to Yup.

Installation

$ npm install yup-personnummer

Usage

import * as Yup from 'yup'
import 'yup-personnummer'

const schema = Yup.string().personnummer().required()

console.log(schema.isValidSync('190905271474')) // true