Expand Minimize

Add curly brackets to Field ID

Field ID must contain curly brackets.

CheckId SPC015102
TypeName AddCurlyBracketsToFieldId
Severity Error
Type Field

The attribute 'ID' of a Field must start and end with curly brackets. Sample (MSDN):

<Field
   ID="{060E50AC-E9C1-4D3C-B1F9-DE0BCAC300F6}"
   Name="Amount"
   DisplayName="Amount">
   ...
</Field>

The MSDN documentation states that 'The value SHOULD be the string representation of a GUID contained within braces ({})'. SPCAF requires the curly brackets.

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":"SPC015102:AddCurlyBracketsToFieldId","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.