Skip to content

Commit

Permalink
UI - Update metadata error states on Sso settings form (#25614)
Browse files Browse the repository at this point in the history
## For #25318 

<img width="1464" alt="Screenshot 2025-01-20 at 12 29 32 PM"
src="https://github.com/user-attachments/assets/80512d78-03e6-40fe-a098-109b0c731fe7"
/>

- [x] Changes file added for user-visible changes in `changes/`
- [x] Manual QA for all new/changed functionality

---------

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
  • Loading branch information
jacobshandling and Jacob Shandling authored Jan 22, 2025
1 parent c576dd5 commit 126426b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions changes/25318-update-sso-settings-error-states
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Add clearer error states to metadata-related fields in the SSO settings form
6 changes: 4 additions & 2 deletions frontend/pages/admin/OrgSettingsPage/cards/Sso/Sso.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ const validate = (formData: ISsoFormData) => {

if (!metadata) {
if (!metadataUrl) {
errors.metadata_url = "Metadata or Metadata URL must be present";
errors.metadata = "Metadata or Metadata URL must be present";
errors.metadata_url =
"Metadata URL is required (if metadata is not present)";
errors.metadata =
"Metadata is required (if metadata URL is not present)";
} else if (
!validUrl({ url: metadataUrl, protocols: ["http", "https"] })
) {
Expand Down

0 comments on commit 126426b

Please sign in to comment.