Declare required attributes in Field |
Required attributes ID, Name and Type must be declared in Field.
CheckId | SPC015105 |
---|---|
TypeName | DeclareAllRequiredAttributesInFields |
Severity | CriticalWarning |
Type | Field |
Add missing required attribute to a Field. See sample below:
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
...
<Field
ID="{060e50ac-e9c1-4d3c-b1f9-de0bcac300f6}"
Name="Amount"
DisplayName="Amount"
Type="Currency"
Decimals="2"
Min="0"
Required="FALSE"
Group="Financial Columns" />
...
</Elements>
...
<Field
ID="{060e50ac-e9c1-4d3c-b1f9-de0bcac300f6}"
Name="Amount"
DisplayName="Amount"
Type="Currency"
Decimals="2"
Min="0"
Required="FALSE"
Group="Financial Columns" />
...
</Elements>
According to MSDN the attribute 'Required' is also required. Reality shows that SharePoint does not expect the attribute. Therefore SPCAF does not require the attribute.
To suppress this violation in XML SharePoint code add the following comment right before the XML tag which causes the rule violation. Learn more about SuppressMessage here.
<!-- "SuppressMessage":{"rule":"SPC015105:DeclareAllRequiredAttributesInFields","justification":"Provide reason for suppression here"} -->
Disclaimer: The views and opinions expressed in this documentation and in SPCAF do not necessarily reflect the opinions and recommendations of Microsoft or any member of Microsoft. SPCAF and RENCORE are registered trademarks of Rencore. All other trademarks, service marks, collective marks, copyrights, registered names, and marks used or cited by this documentation are the property of their respective owners.