Skip to content

Instantly share code, notes, and snippets.

View en0's full-sized avatar

Ian Laird en0

View GitHub Profile
@only-entertainment
only-entertainment / vin_validation.py
Created March 24, 2012 00:42
Validate a VIN using Python
class VINLookupForm(Form):
"""
Lookup a VIN form
"""
vin = TextField(u'Enter VIN',
validators=[validators.Required(u'VIN is required for lookup.')])
def validate_vin(self, field):
"""
Validate a VIN against the 9th position checksum