diff --git a/packages/form-json-schema/src/defs/layout.json b/packages/form-json-schema/src/defs/layout.json index 92f214bd9..86e6ab870 100644 --- a/packages/form-json-schema/src/defs/layout.json +++ b/packages/form-json-schema/src/defs/layout.json @@ -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": { diff --git a/packages/form-json-schema/test/fixtures/layout-empty-row.js b/packages/form-json-schema/test/fixtures/layout-empty-row.js new file mode 100644 index 000000000..e57b7942e --- /dev/null +++ b/packages/form-json-schema/test/fixtures/layout-empty-row.js @@ -0,0 +1,15 @@ +export const form = { + type: 'default', + components: [ + { + type: 'textfield', + key: 'firstName', + layout: { + row: null, + columns: 12 + } + } + ] +}; + +export const errors = null; \ No newline at end of file diff --git a/packages/form-json-schema/test/spec/schemaSpec.js b/packages/form-json-schema/test/spec/schema.spec.js similarity index 100% rename from packages/form-json-schema/test/spec/schemaSpec.js rename to packages/form-json-schema/test/spec/schema.spec.js diff --git a/packages/form-json-schema/test/spec/validationSpec.js b/packages/form-json-schema/test/spec/validation.spec.js similarity index 99% rename from packages/form-json-schema/test/spec/validationSpec.js rename to packages/form-json-schema/test/spec/validation.spec.js index 352d6707a..b2d935393 100644 --- a/packages/form-json-schema/test/spec/validationSpec.js +++ b/packages/form-json-schema/test/spec/validation.spec.js @@ -102,6 +102,9 @@ describe('validation', function() { testForm('validate-validationType'); + testForm('layout-empty-row'); + + describe('rules - required properties', function() {