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

Fixed required validation considering false value falsy #31

Merged
merged 4 commits into from
Apr 17, 2024

Conversation

ralfeis
Copy link
Contributor

@ralfeis ralfeis commented Jan 31, 2024

Hi,

this is a fix for: formio/formio.js#5457

Best regards
Ralf

expect(result).to.equal(null);
});

it('Validating a simple component that is required and present in the data with value=false will return null', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't really a valid test case, because the data from a text field will never be false under normal circumstances. Can we update this test to include a radio component and a checkbox component?

@ralfeis
Copy link
Contributor Author

ralfeis commented Mar 2, 2024

Hi @brendanbond
good point. I fixed the test cases to checkbox and radio component.
Best regards

@brendanbond brendanbond merged commit 672b0ed into formio:master Apr 17, 2024
@travist
Copy link
Member

travist commented Apr 18, 2024

We need to revert this PR because it broke Checkbox "required" validations. If you have a required checkbox, it lets you not click it.

lane-formio added a commit that referenced this pull request Apr 18, 2024
This reverts commit 672b0ed, reversing
changes made to 2102073.
travist added a commit that referenced this pull request Apr 18, 2024
Revert "Merge pull request #31 from ralfeis/master"
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

Successfully merging this pull request may close these issues.

Required Validation does not disappear with formio 5.0.0-x
3 participants