Create an enum attribute. The `elements` param acts as a white-list of accepted values for this attribute.