[ Mini Kiebo ]
Server: Windows NT AKFAR_SERVER 10.0 build 26200 (Windows 10) AMD64
Path:
D:
/
xampp
/
htdocs
/
bem
/
assets
/
jquery-validation
/
src
/
additional
/
[
Home
]
File: nipPL.js
/* * Numer identyfikacji podatkowej ( NIP ) is the way tax identification used in Poland for companies */ $.validator.addMethod( "nipPL", function( value ) { "use strict"; value = value.replace( /[^0-9]/g, "" ); if ( value.length !== 10 ) { return false; } var arrSteps = [ 6, 5, 7, 2, 3, 4, 5, 6, 7 ]; var intSum = 0; for ( var i = 0; i < 9; i++ ) { intSum += arrSteps[ i ] * value[ i ]; } var int2 = intSum % 11; var intControlNr = ( int2 === 10 ) ? 0 : int2; return ( intControlNr === parseInt( value[ 9 ], 10 ) ); }, "Please specify a valid NIP number." );