Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

checkValidity always returns true on readOnly forms #5931

Open
namti opened this issue Dec 1, 2024 · 3 comments
Open

checkValidity always returns true on readOnly forms #5931

namti opened this issue Dec 1, 2024 · 3 comments

Comments

@namti
Copy link

namti commented Dec 1, 2024

Describe the bug
checkValidity function always returns true on readOnly forms.

Version/Branch
4.15.1

To Reproduce
Steps to reproduce the behavior:

  1. Set form option readOnly to true
  2. Invoke checkValidity(submissionJson, true)
  3. If set readOnly to false, checkValidity returns false as expected

Expected behavior
Returns false on invalid forms even they are read only.

Additional context
Add any other context about the problem here.

@namti namti changed the title Options to validate readOnly forms checkValidity always returns true on readOnly forms Dec 1, 2024
@lane-formio
Copy link
Contributor

Have you checked this on later versions?
4.21.5 is our latest 4.x release
5.0.0-rc.100 is our most recent 5.x candidate (expecting to officially release within the next couple weeks)

@namti
Copy link
Author

namti commented Dec 2, 2024

Not yet. I am using @formio/[email protected] which is the latest version of it. The package uses formiojs@^4.15.1 as its dependency.

@namti
Copy link
Author

namti commented Dec 2, 2024

I have made an example using latest RC versions of @formio/react and @formio/js. The problem still exists.

https://stackblitz.com/edit/vitejs-vite-saq3bv?file=src%2FApp.jsx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants