Skip to content

Commit

Permalink
fix(schema): allow rows to be empty in form schema
Browse files Browse the repository at this point in the history
  • Loading branch information
Niklas Kiefer committed Nov 1, 2023
1 parent 2220f19 commit 156cecd
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/form-json-schema/src/defs/layout.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"properties": {
"row": {
"$id": "/#component/layout/row",
"type": "string",
"type": [ "string", "null" ],
"description": "Row in which a form field is placed."
},
"columns": {
Expand Down
15 changes: 15 additions & 0 deletions packages/form-json-schema/test/fixtures/layout-empty-row.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
export const form = {
type: 'default',
components: [
{
type: 'textfield',
key: 'firstName',
layout: {
row: null,
columns: 12
}
}
]
};

export const errors = null;
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ describe('validation', function() {
testForm('validate-validationType');


testForm('layout-empty-row');


describe('rules - required properties', function() {


Expand Down

0 comments on commit 156cecd

Please sign in to comment.