Skip to content

Commit

Permalink
fix: set price field label to required to prevent null issue
Browse files Browse the repository at this point in the history
- [x] set the price page title field to required and unique
- [x] add validation to the value field
- [x] set the currency to required
  • Loading branch information
AliKdhim87 committed Aug 8, 2023
1 parent 0524e85 commit d5fb9aa
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
"component": "components.price"
},
"title": {
"type": "string"
"type": "string",
"unique": true,
"required": true
},
"products": {
"type": "relation",
Expand Down
13 changes: 9 additions & 4 deletions apps/strapi-dashboard/src/components/components/price.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,22 @@
"options": {},
"attributes": {
"label": {
"type": "string"
"type": "string",
"required": true
},
"currency": {
"type": "enumeration",
"enum": ["EUR", "USD"],
"required": false,
"enum": [
"EUR",
"USD"
],
"required": true,
"default": "EUR"
},
"value": {
"type": "decimal",
"required": true
"required": true,
"min": 0
}
}
}

0 comments on commit d5fb9aa

Please sign in to comment.