I have the following ClaimType in a custom policy to test out collecting user timezone during sign up:
<ClaimType Id="extension_timezone">
<DisplayName>Timezone</DisplayName>
<DataType>string</DataType>
<UserHelpText>Enter your timezone</UserHelpText>
<UserInputType>DropdownSingleSelect</UserInputType>
<Restriction>
<Enumeration Text="(UTC-08:00) Pacific Time (US & Canada)" Value="(UTC-08:00) Pacific Time (US & Canada)" SelectByDefault="false" />
<Enumeration Text="(UTC-06:00) Central Time (US & Canada)" Value="(UTC-06:00) Central Time (US & Canada)" SelectByDefault="false" />
<Enumeration Text="(UTC+00:00) Dublin, Edinburgh, Lisbon, London" Value="(UTC+00:00) Dublin, Edinburgh, Lisbon, London" SelectByDefault="true" />
<Enumeration Text="(UTC+12:00) Auckland, Wellington" Value="(UTC+12:00) Auckland, Wellington" SelectByDefault="false" />
</Restriction>
</ClaimType>
This displays correctly in the sign up flow but I have noticed that the input is not validated against the restriction. Steps:
- Select item from drop-down
- Use browser tools (e.g. Chrome DevTools) to change the value of the selected option
- Submit the form
I would expect there to be validation to check that the submitted value matches one of the enumeration entries, but this does not happen. I can include extension_timezone in the output claims and see that the value reflects the changes I made that do not match any of the enumeration options.