Created
June 19, 2014 22:06
-
-
Save cansadadeserfeliz/b7036f4812c003046e04 to your computer and use it in GitHub Desktop.
RegExp: Placas de carros colombianos. Colombian car plates validator.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.core.validators import RegexValidator | |
plates_validator = RegexValidator( | |
r'^([A-Z]{3}\d{3}|[A-Z]{2}\d{4}|[A-Z]{2}\d{3}[A-Z]|[A-Z]\d{4,5}|[A-Z]{3}\d{2}[A-Z])$', | |
u'Combinaciones posibles: ABC123, AB1234, AB123C, A1234, A12345, ABC12D' | |
) | |
# http://www.regexr.com/391ai |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment