SharePoint PnP Webcast – Validating SharePoint Framework client-side web part property values

In this PnP Webcast, we covered techniques on how to validate SharePoint Framework client-side web part property pane values when user is configuring web part. This is relatively common scenario for client-side web part developers where you want to ensure that the provided input value in the web part property pane is as expected. There's two different ways to achieve this, which are inline validation and remote API based validation. You'd use inline validation for simplistic scenarios like validating string input value based one expected structure. Remote API based validation means a scenario where you call for example oob SharePoint API to validate user input. 

Notice. When this webcast was released, SharePoint Framework was available as a Release Candidate release. 

Presentation covers following topics:

  • Validating user input iwth property pane
    • Hook in validation to property pane control properties
    • Two approaches available: inline validation or remote API based validation
    • When using remote API validation, consider delay on the validation execution
  • Reference code on implementing validation for properties
  • Screenshots from the tutorial article available with additional details

Web cast demo (9:53) shows following details

  • Demonstration of the validation in practice
  • Step-by-step coding of inline validation for property value checking
  • Step-by-step coding of remote API based validation for property value checking

Webcast presenters: Waldek MastykarzVesa Juvonen

Presentation used in this web cast is available from http://docs.com/OfficeDevPnP.

Video at YouTube.

Additional resources

See following resources around the SharePoint Framework. 

What is SharePoint Patterns & Practices (PnP) web cast series?

SharePoint / Office Dev Patterns and PracticesSharePoint Patterns & Practices (PnP) webcast series covers different patterns, practices and topics around development with Office 365 and SharePoint. Majority of the topics are valid for the Office 365 and SharePoint on-premises. Our objective is to release new around 30 minute long web cast each Monday with few slides and a live demo on the covered topic. All web casts are published at the PnP YouTube channel with additional references on the existing materials.

PnP is community driven open source project where Microsoft and external community members are sharing their learning's around implementation practices for Office 365 and SharePoint on-premises (add-in model). Active development and contributions happen in our GitHub repositories under dev branch and each month there will be a master merge (monthly release) with more comprehensive testing and communications. Latest activities and future plans are covered in our monthly community calls which are open for anyone from the community. Download invite from http://aka.ms/SPPnP-Call

This is work done by the community for the community without any actual full time people. It’s been great to find both internal and external people who are willing to assist and share their learning's for the benefit of others. This way we can build on the common knowledge of us all. Currently program is facilitated by Microsoft, but already at this point we have multiple community members as part of the Core team and we are looking to extend the Core team with more community members.

If you have any questions, comments or feedback around PnP program or this blog post, please use the Microsoft Tech Community (SharePoint Developer group).

“Sharing is caring”


Vesa Juvonen, Senior Program Manager, SharePoint, Microsoft - 6th of February 2017

Comments powered by Disqus