Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FSunstone] Better form validation error reporting #6662

Closed
3 tasks
vichansson opened this issue Jul 22, 2024 · 0 comments
Closed
3 tasks

[FSunstone] Better form validation error reporting #6662

vichansson opened this issue Jul 22, 2024 · 0 comments

Comments

@vichansson
Copy link
Contributor

Description

Currently the error validation in the stepper is a bit lackluster & uninformative. When errors appear on elements that are currently rendered in that step, the field containing the validation error is highlighted and the error message is shown underneath. But for more advanced steps, where the field is being dynamically rendered, it makes it difficult for the user to pinpoint where the error is taking place since the only thing being shown is a red marker at the top of the stepper
image

Use case

Pinpoint form validation errors more easily

Interface Changes

Instead of displaying a generic "1 error(s) occured" message at the top, output more context around the validation error so the user knows whats failing.

Additional Context
Here's an example of all the context information from a failed validation that should be formatted & displayed to the user in some nice way

{
  "network": {
    "type": "manual",
    "message": [
      "%s error(s) occurred",
      1
    ],
    "NETWORKS": [
      {
        "netid": {
          "type": "required",
          "message": [
            "Network ID missing or malformed!"
          ],
          "ref": {
            "name": "network.NETWORKS.0.netid"
          }
        }
      },
      {
        "netid": {
          "type": "required",
          "message": [
            "Network ID missing or malformed!"
          ]
        }
      }
    ]
  }
}

Progress Status

  • Code committed
  • Testing - QA
  • Documentation (Release notes - resolved issues, compatibility, known issues)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants