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

Adds URL validation to Config Plan creation form #588

Merged
merged 2 commits into from
Sep 14, 2023

Conversation

joewesch
Copy link
Contributor

@joewesch joewesch commented Sep 13, 2023

Currently, there is no URL validation on the creation form since it just gets sent to the Job. The options for URL validation are now either 1) validate and fail the job or 2) validate via JS. I spoke with Jeff and he said he'd rather it fail earlier, so this adds a validation to the JS.

Other changes:

  • Removed HTML calling the modal directly (removed data-target) as the JS will now call it
  • Change the button from button class to submit so you can hit the Enter key to submit the form as well as click the button

Co-authored by: ChatGPT

Why this is needed:
If you enter an invalid URL into the form submission it will run the job and create N number of config plans, all with that invalid URL. As soon as you try and edit (individually or bulk edit) any other field on those objects it will fail validation. In the case of the individual edit the form validation catches it and shows you that it is an invalid URL. In the case of bulk edit, it just reloads the page with no visible error on why.

@jeffkala
Copy link
Contributor

Good with this one. The 2 failed test are fixed in my pr

@jeffkala jeffkala merged commit d29faf4 into wg-kc-update Sep 14, 2023
5 checks passed
@itdependsnetworks itdependsnetworks deleted the jw/url_validate branch October 2, 2023 03:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants