Creates a validator that asserts that the input is one of the values of the given enum.
The enum to validate against.
Creates a validator that asserts that the input is one of the values of the given enum.