diff options
author | Sebastian <sebasjm@gmail.com> | 2023-04-25 12:49:58 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-04-25 12:49:58 -0300 |
commit | f94d7bc15115753ce3c492deb72ff9fdb4a66cba (patch) | |
tree | 9905e48b7c273b7af3885ea7b7d0e387fa6f4eac /packages/merchant-backoffice-ui/src/paths/instance | |
parent | 25346a03fa2577652002583b019fd88dd92a7881 (diff) | |
download | wallet-core-f94d7bc15115753ce3c492deb72ff9fdb4a66cba.tar.xz |
adding user_Type validation when updating instances
Diffstat (limited to 'packages/merchant-backoffice-ui/src/paths/instance')
-rw-r--r-- | packages/merchant-backoffice-ui/src/paths/instance/update/UpdatePage.tsx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/merchant-backoffice-ui/src/paths/instance/update/UpdatePage.tsx b/packages/merchant-backoffice-ui/src/paths/instance/update/UpdatePage.tsx index 1365a59da..2b57ab429 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/update/UpdatePage.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/update/UpdatePage.tsx @@ -98,6 +98,11 @@ export function UpdatePage({ const errors: FormErrors<Entity> = { name: !value.name ? i18n.str`required` : undefined, + user_type: !value.user_type + ? i18n.str`required` + : value.user_type !== "business" && value.user_type !== "individual" + ? i18n.str`should be business or individual` + : undefined, payto_uris: !value.payto_uris || !value.payto_uris.length ? i18n.str`required` |