[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: vinUS.js
/** * Return true, if the value is a valid vehicle identification number (VIN). * * Works with all kind of text inputs. * * @example <input type="text" size="20" name="VehicleID" class="{required:true,vinUS:true}" /> * @desc Declares a required input element whose value must be a valid vehicle identification number. * * @name $.validator.methods.vinUS * @type Boolean * @cat Plugins/Validate/Methods */ $.validator.addMethod( "vinUS", function( v ) { if ( v.length !== 17 ) { return false; } var LL = [ "A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "M", "N", "P", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" ], VL = [ 1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 7, 9, 2, 3, 4, 5, 6, 7, 8, 9 ], FL = [ 8, 7, 6, 5, 4, 3, 2, 10, 0, 9, 8, 7, 6, 5, 4, 3, 2 ], rs = 0, i, n, d, f, cd, cdv; for ( i = 0; i < 17; i++ ) { f = FL[ i ]; d = v.slice( i, i + 1 ); if ( i === 8 ) { cdv = d; } if ( !isNaN( d ) ) { d *= f; } else { for ( n = 0; n < LL.length; n++ ) { if ( d.toUpperCase() === LL[ n ] ) { d = VL[ n ]; d *= f; if ( isNaN( cdv ) && n === 8 ) { cdv = LL[ n ]; } break; } } } rs += d; } cd = rs % 11; if ( cd === 10 ) { cd = "X"; } if ( cd === cdv ) { return true; } return false; }, "The specified vehicle identification number (VIN) is invalid." );
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: premium320.web-hosting.com
Server IP: 66.29.153.54
PHP Version: 8.2.29
Server Software: LiteSpeed
System: Linux premium320.web-hosting.com 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
HDD Total: 97.87 GB
HDD Free: 76.85 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: aoneqssk
User ID (UID): 1285
Group ID (GID): 1290
Script Owner UID: 1285
Current Dir Owner: 1285