Sp-dev-fx-webparts: In react-list-form webpart, validation not firing for required list fields before saving the item

Created on 22 Jun 2020  路  4Comments  路  Source: pnp/sp-dev-fx-webparts

https://github.com/pnp/sp-dev-fx-webparts/tree/master/samples/react-list-form
Sample: #react-list-form
Author: @DanyWyss

Expected or Desired Behavior

List form should perform validation of all required fields before saving

Observed Behavior

List form saving the form without any validation of required fields

Steps to Reproduce

If I leave "Title" field empty, it just shows me message as "Item Added Successfully" after click on save button

image

Steps to reproduce the behavior:

  1. Add the webpart to Modern SharePoint Site
  2. Select sample SharePoint List from Properties
  3. Try to Save without filling required fields
  4. It will show "Item Saved Successfully" message

image

Environment Details (Development & Target environment)

  • OS: Windows 10
  • Target Environment: SharePoint Online
  • Framework: Node.js v8
  • Browser(s): Chrome v83
  • Tooling: VS Code | SPFx v1.9.1
  • Additional details: It shows required error message for DateTime Field and not for Title
help wanted bug

Most helpful comment

Thank you @Harshagracy, you are now assigned!

All 4 comments

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

Hi @hugoabernier, I will look into this issue. Could you please assign my name?

Thank you @Harshagracy, you are now assigned!

Thank you @Harshagracy for fixing the issue 馃憤 and @hugoabernier for merging! 馃憤

Would be nice to have unsupported fields supported in future as well! :)

  • Person Group
  • Managed Metadata
  • HyperLink or Picture
Was this page helpful?
0 / 5 - 0 ratings