Created
June 2, 2010 20:39
-
-
Save rodrigopinto/422959 to your computer and use it in GitHub Desktop.
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
# | |
# Validates format to CNH ( category permission to drive on Brazil) | |
# | |
validates_format_of :license_category, :with => /(^[ABCDE]{1}$)|(AB)/ | |
# | |
# Validates format to License Plate format to Brazil | |
# | |
validates_format_of :license_plate, :with => /([A-Z]{3})\-([0-9]{4})/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment