youtube image
From YouTube: SPFx Design Guidance – Property pane input validation and error messages

Description

In this 13-minute developer-focused demo, Hugo Bernier delivers custom properties (part 4). Help users give you the right information for best and most secure user experience. Best error messages are non-dramatic and helpful. Validate inputs using onGetErrorMessage attribute. Avoid throttling issue by not validating user’s every key stroke, give user time to type using deferredValidationTime attribute, then validate. Validation often requires checking on the existence of list or data before validation can occur. This PnP Community demo is taken from the Viva Connections & SharePoint Framework Bi-weekly sync call recorded on January 27, 2022.

Demo Presenter: Hugo Bernier (Microsoft) | @bernierh

Supporting materials:
• Documentation - Validate web part property values | https://docs.microsoft.com/sharepoint/dev/spfx/web-parts/guidance/validate-web-part-property-values
• Documentation - Make your SharePoint client-side web part configurable | https://docs.microsoft.com/sharepoint/dev/spfx/web-parts/basics/integrate-with-property-pane
• Documentation - Integrate web part properties with SharePoint |
https://docs.microsoft.com/sharepoint/dev/spfx/web-parts/guidance/integrate-web-part-properties-with-sharepoint

Previous demos from Hugo Bernier (Microsoft) | @bernierh, on SPFx Design Patterns series
• SharePoint Framework Design Patterns – Custom Web Part Properties (Part 3) – 13 January
• SPFx Design Patterns – Custom Properties (Part 2) – 30 December
• SPFx Design Patterns – Custom Properties (Part 1) – 4 November
• SPFx Design Patterns – Property Panes - 21 October

Learn more:
• Learn more about the Microsoft 365 Patterns and Practices community at: http://aka.ms/m365pnp
• Visit the Microsoft 365 Patterns and Practices community YouTube channel: https://aka.ms/m365pnp/videos