Simple polish ID card number validator
Currently polish ID card numbers contains of three letters and six digits. Valid numbers are written in format "XXX NNNNNN", where "X" is a letter and "X" is a digit. The space character is optional.
The control digit is first digit, after letters. For example in number: "ABS 123456" control digit equal "1".
In algorithm of control digit validation letters are presented as numbers, where "A" equal "10" and "Z" qeual "35". In polish ID card are allowed only latin letters.
Using validator:
First steep - instalation from NPM:
npm install polish-id-card-validate
Using validator in the application code:
const validate = ; ; //true; //true ; //true; //true ; //false, invalid control digit!
Validator can be use only for new ID card numbers in format "XXX NNNNNN". For old ID card numbers (without control digit) validator returns always FALSE.