-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🚑 Hotfix for more validation mismatches
* Fixed required edit grid inside hidden fieldset throwing validation errors * Fixed validation being applied to content components (which will never have values) * Fixed formio dotted paths leading to containers and respective nested serializers Backport-of: #4078
- Loading branch information
1 parent
83d75f7
commit d466b69
Showing
5 changed files
with
91 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from django.test import SimpleTestCase | ||
|
||
from ...typing import ContentComponent | ||
from .helpers import validate_formio_data | ||
|
||
|
||
class ContentValidationTests(SimpleTestCase): | ||
def test_content_ignored(self): | ||
component: ContentComponent = { | ||
"type": "content", | ||
"key": "Helaas-5.36", | ||
"label": "Nope", | ||
"validate": {"required": False}, | ||
"html": "<p>Nope</p>", | ||
} | ||
|
||
is_valid, _ = validate_formio_data(component, {}) | ||
|
||
self.assertTrue(is_valid) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters