jss icon indicating copy to clipboard operation
jss copied to clipboard

[React Form] Sitecore Form field validation rules not working

Open ahiyalala opened this issue 3 years ago • 2 comments

Description

Sitecore Form rules such as Email Validator, or Number Validator are not being evaluated.

Expected behavior

  • JSS React Form should show an error when validators set on certain fields fail.

Steps To Reproduce

  1. Create a Sitecore Forms form with a Single-line Text field (or a Telephone field), check the "Phone Number Validator" or "Number Validator" if not yet applied, then Publish
  2. Apply created Sitecore Forms to JSS application as defined in the docs here
  3. Fill up the form with an invalid value (093G1234567)
  4. Form would be submitted even if it shouldn't.

Your Environment

  • Sitecore Version: 9.3
  • JSS Version: 13.2
  • Browser Name and version: MS Edge
  • Operating System and version (desktop or mobile): Windows 11

ahiyalala avatar Aug 23 '22 06:08 ahiyalala

Figured it out:

I was working on Dutch (Netherlands) language version, so I checked the "Phone Number Validator" item and there's no Dutch (Netherlands) version of that item that's why it didn't run.

But should this actually be the case or should it at least use the item's fallback language?

ahiyalala avatar Aug 24 '22 04:08 ahiyalala

This is happening to me. Is there no client side validation when using react forms package for jss?

layonthebeech avatar Sep 01 '22 20:09 layonthebeech

This has been automatically marked as stale because it has not had recent activity. It will be closed if there is no further activity within 30 days. You may add comments or the 'keep' label to prevent it from closing. Thank you for your contributions.

stale[bot] avatar Sep 03 '23 20:09 stale[bot]