Fix issue where hyphenated slugs were allowed

Hyphenated slugs mean that the property is not accessible on the entity
object attached to certain models because hyphen is not a valid
character for a python attribute name.