diff --git a/openmetadata-ui/src/main/resources/ui/src/components/NavBar/nav-bar.less b/openmetadata-ui/src/main/resources/ui/src/components/NavBar/nav-bar.less index 7fffc4a7730..597f79e5155 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/NavBar/nav-bar.less +++ b/openmetadata-ui/src/main/resources/ui/src/components/NavBar/nav-bar.less @@ -10,113 +10,112 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - @import (reference) '../../styles/variables.less'; +@import (reference) '../../styles/variables.less'; - .navbar-container { - display: flex; - align-items: center; - justify-content: space-between; - - > div { - height: 40px; - - .ant-input-wrapper.ant-input-group, - .ant-input-affix-wrapper { - height: 40px; - } - } - - .search-container { - width: 35vw; - } - - .app-user-icon { - display: flex; - justify-content: space-between; - align-items: center; - cursor: pointer; - - .username { - font-weight: 500; - line-height: 21px; - } - } - } - - .domain-dropdown-menu { - max-height: 400px; - overflow-y: auto; - } - - .slide-in-top { - animation: slide-in-top 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) both; - } - - @keyframes slide-in-top { - 0% { - transform: translate(-50%, 100%); - } - - 100% { - transform: translate(-50%, 0); - } - } - - .ant-btn.domain-nav-btn { - background-color: @white; - border: 1px solid @grey-15; - color: @text-color; - height: 40px; - - .domain-text { - max-width: 15vw; - color: inherit; - } - - &:hover, - &:focus { - background-color: @primary-button-background; - border: 1px solid @alert-info-icon-bg-1; - color: @text-color; - } - - &.domain-active { - color: @primary-color; - border: 1px solid @primary-color; - background-color: @primary-button-background; - } - } - - .ant-alert.ant-alert-info.refresh-alert { - width: 470px; - bottom: 30px; - align-items: center; - z-index: 9999; - margin: 0 auto; - box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.12); - border-radius: 10px; - border: 1px solid @text-color; - background: @text-color; - color: @white; - position: fixed; - left: 50%; - transform: translateX(-50%); - - .ant-alert-message { - color: @white; - } - - .ant-alert-description { - color: @grey-4; - } - - .ant-alert-content { - border-right: 1px solid @white; - } - - .ant-btn { - font-weight: 700; - color: @white; - } - } - \ No newline at end of file +.navbar-container { + display: flex; + align-items: center; + justify-content: space-between; + + > div { + height: 40px; + + .ant-input-wrapper.ant-input-group, + .ant-input-affix-wrapper { + height: 40px; + } + } + + .search-container { + width: 35vw; + } + + .app-user-icon { + display: flex; + justify-content: space-between; + align-items: center; + cursor: pointer; + + .username { + font-weight: 500; + line-height: 21px; + } + } +} + +.domain-dropdown-menu { + max-height: 400px; + overflow-y: auto; +} + +.slide-in-top { + animation: slide-in-top 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) both; +} + +@keyframes slide-in-top { + 0% { + transform: translate(-50%, 100%); + } + + 100% { + transform: translate(-50%, 0); + } +} + +.ant-btn.domain-nav-btn { + background-color: @white; + border: 1px solid @grey-15; + color: @text-color; + height: 40px; + + .domain-text { + max-width: 15vw; + color: inherit; + } + + &:hover, + &:focus { + background-color: @primary-button-background; + border: 1px solid @alert-info-icon-bg-1; + color: @text-color; + } + + &.domain-active { + color: @primary-color; + border: 1px solid @primary-color; + background-color: @primary-button-background; + } +} + +.ant-alert.ant-alert-info.refresh-alert { + width: 470px; + bottom: 30px; + align-items: center; + z-index: 9999; + margin: 0 auto; + box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.12); + border-radius: 10px; + border: 1px solid @text-color; + background: @text-color; + color: @white; + position: fixed; + left: 50%; + transform: translateX(-50%); + + .ant-alert-message { + color: @white; + } + + .ant-alert-description { + color: @grey-4; + } + + .ant-alert-content { + border-right: 1px solid @white; + } + + .ant-btn { + font-weight: 700; + color: @white; + } +} diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/de-de.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/de-de.json index 6b38619bafa..b4765187343 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/de-de.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/de-de.json @@ -2148,6 +2148,7 @@ "user-verified-successfully": "Benutzer erfolgreich verifiziert", "valid-url-endpoint": "Endpunkte sollten gültige URLs sein", "validation-error-assets": "Bitte überprüfen Sie alle Assets, die hinzugefügt werden.", + "value-must-be-greater-than": "{{field}} muss größer als {{minimum}} sein", "value-should-equal-to-value": "Der Wert sollte gleich {{value}} sein.", "value-should-not-equal-to-value": "Der Wert sollte nicht gleich {{value}} sein.", "version-released-try-now": "{{version}} Veröffentlicht <0>Sehen Sie, was es Neues gibt!", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json index fa9fdbea439..9c471f5faa1 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json @@ -2148,6 +2148,7 @@ "user-verified-successfully": "User Verified Successfully", "valid-url-endpoint": "Endpoints should be valid URL", "validation-error-assets": "Please examine all your assets that are being added", + "value-must-be-greater-than": "{{field}} must be greater than {{minimum}}", "value-should-equal-to-value": "The value should be equal to {{value}}.", "value-should-not-equal-to-value": "The value should not be equal to {{value}}.", "version-released-try-now": "{{version}} Released <0>See What's New!", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/es-es.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/es-es.json index 1ce4a17e7b5..b6bd1033df9 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/es-es.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/es-es.json @@ -2148,6 +2148,7 @@ "user-verified-successfully": "Usuario verificado con éxito", "valid-url-endpoint": "Los terminales deben ser URL válidas", "validation-error-assets": "Por favor, examine todos sus activos que se están agregando", + "value-must-be-greater-than": "{{field}} debe ser mayor que {{minimum}}", "value-should-equal-to-value": "The value should be equal to {{value}}.", "value-should-not-equal-to-value": "The value should not be equal to {{value}}.", "version-released-try-now": "{{version}} Lanzado <0>¡Mira qué hay de nuevo!", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/fr-fr.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/fr-fr.json index 094fd6bba4c..bcd6a728b65 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/fr-fr.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/fr-fr.json @@ -2148,6 +2148,7 @@ "user-verified-successfully": "L'utilisateur a été vérifié avec succès", "valid-url-endpoint": "Les points de terminaison doivent être une URL valide", "validation-error-assets": "Veuillez exmanier tous les actifs qui sont ajoutés", + "value-must-be-greater-than": "{{field}} doit être supérieur à {{minimum}}", "value-should-equal-to-value": "La valeur devrait être égale à {{value}}.", "value-should-not-equal-to-value": "La valeur ne devrait pas être égale à {{value}}.", "version-released-try-now": "{{version}} publié essayez maintenant !", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/gl-es.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/gl-es.json index d329c5a5518..cf3b5002c9a 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/gl-es.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/gl-es.json @@ -2148,6 +2148,7 @@ "user-verified-successfully": "Usuario verificado correctamente", "valid-url-endpoint": "Os endpoints deben ser unha URL válida", "validation-error-assets": "Examina todos os teus activos que están sendo engadidos", + "value-must-be-greater-than": "{{field}} debe ser maior que {{minimum}}", "value-should-equal-to-value": "O valor debe ser igual a {{value}}.", "value-should-not-equal-to-value": "O valor non debe ser igual a {{value}}.", "version-released-try-now": "{{version}} Lançada <0>Vexa as Novidades!", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/he-he.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/he-he.json index 40f64b085cc..d1be0640dfb 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/he-he.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/he-he.json @@ -2148,6 +2148,7 @@ "user-verified-successfully": "משתמש אומת בהצלחה", "valid-url-endpoint": "נקודות קצה צריכות להיות URL תקף", "validation-error-assets": "Please examine all your assets that are being added", + "value-must-be-greater-than": "{{field}} חייב להיות גדול מ-{{minimum}}", "value-should-equal-to-value": "The value should be equal to {{value}}.", "value-should-not-equal-to-value": "The value should not be equal to {{value}}.", "version-released-try-now": "{{version}} שוחרר <0>ראה מה חדש!", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/ja-jp.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/ja-jp.json index 6b9a16e28f8..ef6417e8401 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/ja-jp.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/ja-jp.json @@ -2148,6 +2148,7 @@ "user-verified-successfully": "ユーザ認証に成功しました", "valid-url-endpoint": "エンドポイントは有効なURLでなければなりません", "validation-error-assets": "Please examine all your assets that are being added", + "value-must-be-greater-than": "{{field}} は {{minimum}} より大きくなければなりません", "value-should-equal-to-value": "The value should be equal to {{value}}.", "value-should-not-equal-to-value": "The value should not be equal to {{value}}.", "version-released-try-now": "{{version}} Released <0>See What's New!", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/ko-kr.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/ko-kr.json index c57c13e8cbf..d291ff8dde3 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/ko-kr.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/ko-kr.json @@ -2148,6 +2148,7 @@ "user-verified-successfully": "사용자가 성공적으로 확인되었습니다", "valid-url-endpoint": "엔드포인트는 유효한 URL이어야 합니다", "validation-error-assets": "추가 중인 모든 자산을 검토하세요", + "value-must-be-greater-than": "{{field}}는 {{minimum}}보다 커야 합니다", "value-should-equal-to-value": "값은 {{value}}와(과) 같아야 합니다.", "value-should-not-equal-to-value": "값은 {{value}}와(과) 같지 않아야 합니다.", "version-released-try-now": "{{version}} 출시됨 <0>새로운 기능 확인하기!", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/mr-in.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/mr-in.json index 54ba44197f3..b54312c773c 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/mr-in.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/mr-in.json @@ -2148,6 +2148,7 @@ "user-verified-successfully": "वापरकर्ता यशस्वीरित्या सत्यापित केला", "valid-url-endpoint": "एंडपॉईंट्स वैध URL असावेत", "validation-error-assets": "कृपया तुम्ही जोडत असलेल्या सर्व ॲसेट्सची तपासणी करा", + "value-must-be-greater-than": "{{field}} {{minimum}} पेक्षा मोठा असावा", "value-should-equal-to-value": "मूल्य {{value}} च्या बरोबरीचे असावे.", "value-should-not-equal-to-value": "मूल्य {{value}} च्या बरोबरीचे नसावे.", "version-released-try-now": "{{version}} रिलीझ झाले <0>नवीन काय आहे ते पहा!", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/nl-nl.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/nl-nl.json index c5de8efac64..3bc446e357f 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/nl-nl.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/nl-nl.json @@ -2148,6 +2148,7 @@ "user-verified-successfully": "Gebruiker succesvol geverifieerd", "valid-url-endpoint": "Eindpunten moeten geldige URL's zijn", "validation-error-assets": "Onderzoek al je assets die worden toegevoegd", + "value-must-be-greater-than": "{{field}} moet groter zijn dan {{minimum}}", "value-should-equal-to-value": "The value should be equal to {{value}}.", "value-should-not-equal-to-value": "The value should not be equal to {{value}}.", "version-released-try-now": "{{version}} vrijgegeven <0>Zie wat er veranderd is!", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/pr-pr.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/pr-pr.json index 3530c35db9e..77c2c5ca509 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/pr-pr.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/pr-pr.json @@ -2148,6 +2148,7 @@ "user-verified-successfully": "کاربر با موفقیت تأیید شد.", "valid-url-endpoint": "نقاط پایانی باید URL معتبر باشند.", "validation-error-assets": "لطفاً تمام دارایی‌هایی که در حال اضافه کردن آن‌ها هستید را بررسی کنید.", + "value-must-be-greater-than": "{{field}} {{minimum}} से अधिक होना चाहिए", "value-should-equal-to-value": "مقدار باید برابر با {{value}} باشد.", "value-should-not-equal-to-value": "مقدار نباید برابر با {{value}} باشد.", "version-released-try-now": "{{version}} منتشر شد <0>مشاهده کنید چه خبر است!", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/pt-br.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/pt-br.json index f3617affd80..c07ae09cfc0 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/pt-br.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/pt-br.json @@ -2148,8 +2148,9 @@ "user-verified-successfully": "Usuário verificado com sucesso", "valid-url-endpoint": "Os endpoints devem ser URLs válidas", "validation-error-assets": "Por favor, verifique todos os seus ativos que estão sendo adicionados", - "value-should-equal-to-value": "The value should be equal to {{value}}.", - "value-should-not-equal-to-value": "The value should not be equal to {{value}}.", + "value-must-be-greater-than": "{{field}} deve ser maior que {{minimum}}", + "value-should-equal-to-value": "O valor deve ser igual a {{value}}.", + "value-should-not-equal-to-value": "O valor não deve ser igual a {{value}}.", "version-released-try-now": "{{version}} Lançada <0>Veja o que há de novo!", "video-playback-not-supported": "Seu navegador não suporta a reprodução de vídeo.", "view-deleted-entity": "Visualize todos os {{entity}} excluídos, que fazem parte deste {{parent}}.", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/pt-pt.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/pt-pt.json index c860e222807..ae7eff77f98 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/pt-pt.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/pt-pt.json @@ -2148,6 +2148,7 @@ "user-verified-successfully": "Utilizador verificado com sucesso", "valid-url-endpoint": "Os endpoints devem ser URLs válidas", "validation-error-assets": "Por favor, verifique todos os seus ativos que estão sendo adicionados", + "value-must-be-greater-than": "{{field}} deve ser superior a {{minimum}}", "value-should-equal-to-value": "The value should be equal to {{value}}.", "value-should-not-equal-to-value": "The value should not be equal to {{value}}.", "version-released-try-now": "{{version}} Lançada <0>Veja o que há de novo!", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/ru-ru.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/ru-ru.json index 5250084d771..98076776c45 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/ru-ru.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/ru-ru.json @@ -2148,6 +2148,7 @@ "user-verified-successfully": "Пользователь успешно проверен", "valid-url-endpoint": "Конечные точки должны быть действительным URL", "validation-error-assets": "Please examine all your assets that are being added", + "value-must-be-greater-than": "{{field}} должно быть больше чем {{minimum}}", "value-should-equal-to-value": "The value should be equal to {{value}}.", "value-should-not-equal-to-value": "The value should not be equal to {{value}}.", "version-released-try-now": "Выпущена {{версия}} <0>Посмотрите, что нового!", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/th-th.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/th-th.json index 7e30bec523c..d01b359498d 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/th-th.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/th-th.json @@ -2148,6 +2148,7 @@ "user-verified-successfully": "ผู้ใช้ได้รับการตรวจสอบแล้วสำเร็จ", "valid-url-endpoint": "จุดสิ้นสุดต้องเป็น URL ที่ถูกต้อง", "validation-error-assets": "โปรดตรวจสอบสินทรัพย์ทั้งหมดที่กำลังถูกเพิ่ม", + "value-must-be-greater-than": "{{field}} ต้องมากกว่า {{minimum}}", "value-should-equal-to-value": "ค่าต้องเท่ากับ {{value}}", "value-should-not-equal-to-value": "ค่าต้องไม่เท่ากับ {{value}}", "version-released-try-now": "{{version}} ได้ออกแล้ว <0>ดูสิ่งใหม่!", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/zh-cn.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/zh-cn.json index 0d02646d98a..64f68b37a96 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/zh-cn.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/zh-cn.json @@ -2148,6 +2148,7 @@ "user-verified-successfully": "用户验证成功", "valid-url-endpoint": "端点应该是有效的 URL", "validation-error-assets": "请检查您正在添加的全部资产", + "value-must-be-greater-than": "{{field}} 必须大于 {{minimum}}", "value-should-equal-to-value": "该值应等于{{value}}.", "value-should-not-equal-to-value": "该值不应等于{{value}}.", "version-released-try-now": "查看新版本 {{version}} 的新特性!", diff --git a/openmetadata-ui/src/main/resources/ui/src/styles/components/rjsf.less b/openmetadata-ui/src/main/resources/ui/src/styles/components/rjsf.less index f32369a7201..70dc7516ec8 100644 --- a/openmetadata-ui/src/main/resources/ui/src/styles/components/rjsf.less +++ b/openmetadata-ui/src/main/resources/ui/src/styles/components/rjsf.less @@ -137,3 +137,7 @@ cursor: pointer; accent-color: @primary-color; } + +.rjsf .has-error input { + border-color: @error-color !important; +} diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/ApplicationSchemas/DataInsightsApplication.json b/openmetadata-ui/src/main/resources/ui/src/utils/ApplicationSchemas/DataInsightsApplication.json index 9d64a7cf7c2..55fa25a3c91 100644 --- a/openmetadata-ui/src/main/resources/ui/src/utils/ApplicationSchemas/DataInsightsApplication.json +++ b/openmetadata-ui/src/main/resources/ui/src/utils/ApplicationSchemas/DataInsightsApplication.json @@ -75,7 +75,8 @@ "title": "Data Retention (Days)", "description": "Defines the number of days the Data Assets Insights information will be kept. After it they will be deleted.", "type": "integer", - "default": 7 + "default": 7, + "minimum": 0 }, "serviceFilter": { "type": "object", @@ -173,7 +174,8 @@ "batchSize": { "description": "Maximum number of events processed at a time (Default 100).", "type": "integer", - "default": 100 + "default": 100, + "minimum": 0 }, "recreateDataAssetsIndex": { "title": "Recreate DataInsights DataAssets Index", diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/ApplicationSchemas/SearchIndexingApplication.json b/openmetadata-ui/src/main/resources/ui/src/utils/ApplicationSchemas/SearchIndexingApplication.json index 6366cee420b..bab29ada7aa 100644 --- a/openmetadata-ui/src/main/resources/ui/src/utils/ApplicationSchemas/SearchIndexingApplication.json +++ b/openmetadata-ui/src/main/resources/ui/src/utils/ApplicationSchemas/SearchIndexingApplication.json @@ -8,55 +8,64 @@ "title": "Batch Size", "description": "Maximum number of events entities in a batch (Default 100).", "type": "integer", - "default": 100 + "default": 100, + "minimum": 1 }, "payLoadSize": { "title": "Payload Size", "description": "Maximum number of events entities in a batch (Default 100).", "type": "integer", - "default": 104857600 + "default": 104857600, + "minimum": 1 }, "producerThreads": { "title": "Number of Producer Threads", "description": "Number of threads to use for reindexing", "type": "integer", - "default": 5 + "default": 5, + "minimum": 1 }, "consumerThreads": { "title": "Number of Consumer Threads", "description": "Number of threads to use for reindexing", "type": "integer", - "default": 1 + "default": 1, + "minimum": 1 }, "queueSize": { "title": "Queue Size to use.", "description": "Queue Size to use internally for reindexing.", "type": "integer", - "default": 100 + "default": 100, + "minimum": 1 }, "maxConcurrentRequests": { "title": "Max Concurrent Requests", "description": "Maximum number of concurrent requests to the search index", "type": "integer", - "default": 100 + "default": 100, + "minimum": 1 }, "maxRetries": { "title": "Max Retries", "description": "Maximum number of retries for a failed request", "type": "integer", - "default": 5 + "default": 5, + "minimum": 0 }, "initialBackoff": { "title": "Initial Backoff Millis", "description": "Initial backoff time in milliseconds", "type": "integer", - "default": 1000 + "default": 1000, + "minimum": 0 }, "maxBackoff": { "title": "Max Backoff Millis", "description": "Maximum backoff time in milliseconds", "type": "integer", - "default": 10000 + "default": 10000, + "minimum": 0 }, "entities": { "title": "Entities", diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/formUtils.tsx b/openmetadata-ui/src/main/resources/ui/src/utils/formUtils.tsx index 110d3c31f22..e951ff53437 100644 --- a/openmetadata-ui/src/main/resources/ui/src/utils/formUtils.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/utils/formUtils.tsx @@ -278,7 +278,7 @@ export const generateFormFields = (fields: FieldProp[]) => { export const transformErrors: ErrorTransformer = (errors) => { const errorRet = errors.map((error) => { - const { property } = error; + const { property, params, name } = error; /** * For nested fields we have to check if it's property start with "." @@ -290,12 +290,25 @@ export const transformErrors: ErrorTransformer = (errors) => { // If element is not present in DOM, ignore error if (document.getElementById(id)) { - const fieldName = error.params?.missingProperty; - if (fieldName) { - const customMessage = i18n.t('message.field-text-is-required', { - fieldText: startCase(fieldName), - }); - error.message = customMessage; + const fieldName = startCase(property?.split('/').pop() ?? ''); + + const errorMessages = { + required: () => ({ + message: i18n.t('message.field-text-is-required', { + fieldText: startCase(params?.missingProperty), + }), + }), + minimum: () => ({ + message: i18n.t('message.value-must-be-greater-than', { + field: fieldName, + minimum: params?.limit, + }), + }), + }; + + const errorHandler = errorMessages[name as keyof typeof errorMessages]; + if (errorHandler && params) { + error.message = errorHandler().message; return error; }