It seems that Site Columns defined as Type="Choice"
ignore the Required="TRUE"
attribute when it comes to form validation on the Edit/New pages. In this sceanrio, I chose to not define a default value because I need the user to explicitly read and select a value...yet the form still saves when the field is left blank.
Is this expected behavior and is there a work-around? I am developing my feature in Visual Studio so whatever the solution is, it needs to be implemented in a way that can be deployed as a feature.
More Info
Here is my original field definition
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Field
ID="{5f8fe565-f627-4aed-b7b1-48e5bd2ec8ac}"
Name="TechnicalReviewAction"
DisplayName="Technical Review Action"
Type="Choice"
Required="TRUE"
Format="Dropdown"
FillInChoice="FALSE"
Group="Knowledge Base Articles">
<Default></Default>
<CHOICES>
<CHOICE>Publish</CHOICE>
<CHOICE>Revise</CHOICE>
<CHOICE>Reject</CHOICE>
</CHOICES>
</Field>
I have tried it with different combinations of including/excluding empty Default element and the FillInChoice element.
Here is the definition in the content type
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<!-- Parent ContentType: Workflow Task (0x010801) -->
<ContentType ID="0x010801003EE4B5580C5846B6BE74BFC41A663388"
Name="Technical Review Task"
Group="KB Article"
Description="Content Type for Technical Review Tasks in KB Workflow"
Inherits="TRUE"
Version="0">
<FieldRefs>
<FieldRef ID="{5f8fe565-f627-4aed-b7b1-48e5bd2ec8ac}"
Name="TechnicalReviewAction"
DisplayName="Action" />
<FieldRef ID="{5f4f08ad-7f5b-4d5d-879c-50b416acae3d}"
Name="ActionComment" />
</FieldRefs>
</ContentType>
And here is a screenshot of the form. As you can see there is no asterisks indicating a required field and of course the form saves without entering a value.
<Default></Default>
. I've also updated my answer. – Robert Kaucher Feb 24 '14 at 19:42