Skip to content

Commit

Permalink
fix(ue): validation on name property and making enum required(#181)
Browse files Browse the repository at this point in the history
Co-authored-by: Talmiz Ahmed <[email protected]>
  • Loading branch information
TalmizAhmed and Talmiz Ahmed authored Oct 7, 2024
1 parent a8673ef commit 2da6a73
Show file tree
Hide file tree
Showing 2 changed files with 105 additions and 21 deletions.
114 changes: 96 additions & 18 deletions component-models.json
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,12 @@
"name": "name",
"label": "Name",
"valueType": "string",
"required": true
"required": true,
"valueFormat": "regexp",
"validation": {
"regExp": "^[^$].*",
"customErrorMsg": "Name cannot start with $"
}
},
{
"component": "text",
Expand Down Expand Up @@ -599,7 +604,12 @@
"name": "name",
"label": "Name",
"valueType": "string",
"required": true
"required": true,
"valueFormat": "regexp",
"validation": {
"regExp": "^[^$].*",
"customErrorMsg": "Name cannot start with $"
}
},
{
"component": "text",
Expand Down Expand Up @@ -650,7 +660,8 @@
"name": "enum",
"label": "Options (Data Value)",
"valueType": "string",
"multi": true
"multi": true,
"required": true
},
{
"component": "text",
Expand Down Expand Up @@ -767,7 +778,12 @@
"name": "name",
"label": "Name",
"valueType": "string",
"required": true
"required": true,
"valueFormat": "regexp",
"validation": {
"regExp": "^[^$].*",
"customErrorMsg": "Name cannot start with $"
}
},
{
"component": "text",
Expand Down Expand Up @@ -961,7 +977,12 @@
"name": "name",
"label": "Name",
"valueType": "string",
"required": true
"required": true,
"valueFormat": "regexp",
"validation": {
"regExp": "^[^$].*",
"customErrorMsg": "Name cannot start with $"
}
},
{
"component": "text",
Expand Down Expand Up @@ -1012,7 +1033,8 @@
"name": "enum",
"label": "Options (Data Value)",
"valueType": "string",
"multi": true
"multi": true,
"required": true
},
{
"component": "text",
Expand Down Expand Up @@ -1099,7 +1121,12 @@
"name": "name",
"label": "Name",
"valueType": "string",
"required": true
"required": true,
"valueFormat": "regexp",
"validation": {
"regExp": "^[^$].*",
"customErrorMsg": "Name cannot start with $"
}
},
{
"component": "text",
Expand Down Expand Up @@ -1265,7 +1292,12 @@
"name": "name",
"label": "Name",
"valueType": "string",
"required": true
"required": true,
"valueFormat": "regexp",
"validation": {
"regExp": "^[^$].*",
"customErrorMsg": "Name cannot start with $"
}
},
{
"component": "text",
Expand Down Expand Up @@ -1402,7 +1434,12 @@
"name": "name",
"label": "Name",
"valueType": "string",
"required": true
"required": true,
"valueFormat": "regexp",
"validation": {
"regExp": "^[^$].*",
"customErrorMsg": "Name cannot start with $"
}
},
{
"component": "text",
Expand Down Expand Up @@ -1557,7 +1594,12 @@
"name": "name",
"label": "Name",
"valueType": "string",
"required": true
"required": true,
"valueFormat": "regexp",
"validation": {
"regExp": "^[^$].*",
"customErrorMsg": "Name cannot start with $"
}
},
{
"component": "text",
Expand Down Expand Up @@ -1641,7 +1683,12 @@
"name": "name",
"label": "Name",
"valueType": "string",
"required": true
"required": true,
"valueFormat": "regexp",
"validation": {
"regExp": "^[^$].*",
"customErrorMsg": "Name cannot start with $"
}
},
{
"component": "text",
Expand Down Expand Up @@ -1829,7 +1876,12 @@
"name": "name",
"label": "Name",
"valueType": "string",
"required": true
"required": true,
"valueFormat": "regexp",
"validation": {
"regExp": "^[^$].*",
"customErrorMsg": "Name cannot start with $"
}
},
{
"component": "text",
Expand Down Expand Up @@ -1941,7 +1993,12 @@
"name": "name",
"label": "Name",
"valueType": "string",
"required": true
"required": true,
"valueFormat": "regexp",
"validation": {
"regExp": "^[^$].*",
"customErrorMsg": "Name cannot start with $"
}
},
{
"component": "text",
Expand Down Expand Up @@ -1992,7 +2049,8 @@
"name": "enum",
"label": "Options (Data Value)",
"valueType": "string",
"multi": true
"multi": true,
"required": true
},
{
"component": "text",
Expand Down Expand Up @@ -2109,7 +2167,12 @@
"name": "name",
"label": "Name",
"valueType": "string",
"required": true
"required": true,
"valueFormat": "regexp",
"validation": {
"regExp": "^[^$].*",
"customErrorMsg": "Name cannot start with $"
}
},
{
"component": "text",
Expand Down Expand Up @@ -2218,7 +2281,12 @@
"name": "name",
"label": "Name",
"valueType": "string",
"required": true
"required": true,
"valueFormat": "regexp",
"validation": {
"regExp": "^[^$].*",
"customErrorMsg": "Name cannot start with $"
}
},
{
"component": "text",
Expand Down Expand Up @@ -2390,7 +2458,12 @@
"name": "name",
"label": "Name",
"valueType": "string",
"required": true
"required": true,
"valueFormat": "regexp",
"validation": {
"regExp": "^[^$].*",
"customErrorMsg": "Name cannot start with $"
}
},
{
"component": "text",
Expand Down Expand Up @@ -2562,7 +2635,12 @@
"name": "name",
"label": "Name",
"valueType": "string",
"required": true
"required": true,
"valueFormat": "regexp",
"validation": {
"regExp": "^[^$].*",
"customErrorMsg": "Name cannot start with $"
}
},
{
"component": "text",
Expand Down
12 changes: 9 additions & 3 deletions models/form/_common.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@
"name": "name",
"label": "Name",
"valueType": "string",
"required": true
"required": true,
"valueFormat": "regexp",
"validation": {
"regExp": "^[^$].*",
"customErrorMsg": "Name cannot start with $"
}
},
{
"component": "text",
Expand Down Expand Up @@ -72,7 +77,8 @@
"name": "enum",
"label": "Options (Data Value)",
"valueType": "string",
"multi": true
"multi": true,
"required": true
},
{
"component": "text",
Expand Down Expand Up @@ -111,4 +117,4 @@
"description": "Error message shown when required field is left empty."
}
]
}
}

0 comments on commit 2da6a73

Please sign in to comment.