Pull regexp into a constant
Get DRYer by using already defined regex
Merge branch 'refactoring/revamp-format-validation'