Add validation, c++11 enum class, example.