@routevn/creator-model 1.7.0 → 1.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/model.js +9 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@routevn/creator-model",
3
- "version": "1.7.0",
3
+ "version": "1.7.1",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/model.js CHANGED
@@ -3457,6 +3457,7 @@ const validateLayoutElementData = ({
3457
3457
  "multiline",
3458
3458
  "disabled",
3459
3459
  "maxLength",
3460
+ "formRole",
3460
3461
  "padding",
3461
3462
  "conditionalOverrides",
3462
3463
  "direction",
@@ -3906,6 +3907,13 @@ const validateLayoutElementData = ({
3906
3907
  );
3907
3908
  }
3908
3909
 
3910
+ if (data.formRole !== undefined && data.formRole !== "submit") {
3911
+ return invalidFromErrorFactory(
3912
+ errorFactory,
3913
+ `${path}.formRole must be 'submit' when provided`,
3914
+ );
3915
+ }
3916
+
3909
3917
  if (
3910
3918
  data.direction !== undefined &&
3911
3919
  data.direction !== "absolute" &&
@@ -4146,6 +4154,7 @@ const validateLayoutElementItems = ({ items, path, errorFactory }) => {
4146
4154
  "multiline",
4147
4155
  "disabled",
4148
4156
  "maxLength",
4157
+ "formRole",
4149
4158
  "padding",
4150
4159
  "conditionalOverrides",
4151
4160
  "direction",