From 4b12f139261cf322a4822d0f283c02ff6a5a8452 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Tue, 2 Sep 2025 16:47:03 +0530 Subject: [PATCH] feat: add validations --- .../dashboard/i18n/locale/en/settings.json | 5 +- .../security/components/SamlSettings.vue | 90 +++++++++++++------ 2 files changed, 65 insertions(+), 30 deletions(-) diff --git a/app/javascript/dashboard/i18n/locale/en/settings.json b/app/javascript/dashboard/i18n/locale/en/settings.json index 891dd14e7..429a5a5dc 100644 --- a/app/javascript/dashboard/i18n/locale/en/settings.json +++ b/app/javascript/dashboard/i18n/locale/en/settings.json @@ -427,7 +427,10 @@ "DISABLED": "SAML settings disabled successfully" }, "VALIDATION": { - "REQUIRED_FIELDS": "SSO URL, Identity Provider Entity ID, and Certificate are required fields" + "REQUIRED_FIELDS": "SSO URL, Identity Provider Entity ID, and Certificate are required fields", + "SSO_URL_ERROR": "Please enter a valid SSO URL", + "CERTIFICATE_ERROR": "Certificate is required", + "IDP_ENTITY_ID_ERROR": "Identity Provider Entity ID is required" }, "ENTERPRISE_PAYWALL": { "AVAILABLE_ON": "The SAML SSO feature is only available in the Enterprise plans.", diff --git a/app/javascript/dashboard/routes/dashboard/settings/security/components/SamlSettings.vue b/app/javascript/dashboard/routes/dashboard/settings/security/components/SamlSettings.vue index edfacf266..32f8c8846 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/security/components/SamlSettings.vue +++ b/app/javascript/dashboard/routes/dashboard/settings/security/components/SamlSettings.vue @@ -1,6 +1,8 @@