perfsonar / perfsonar/pscompose

Problems with UI form validation

Open
#200 0 comments 0 reactions 1 assignee View on GitHub

@sartaj10 is already working on this.

Since May 30, 2026.

Dominant language
Python
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Noticed the following issues

  1. On a number component with +/- buttons, the UI sometimes doesn't show validation error. For example: packet-interval option in latency test which is optional and can have a value > 0, sometimes it will error out when i set packet interval to 0 and sometimes it doesn't
=> Fixed it by dispatching a change event when the +/- buttons are pressed
  1. Another thing was that let's say i fill in a value. then i decide i don't want to fill in anything. it still errors out because it expects a value. For example, same packet-interval value in latency test expects a value between 0 and 1. But since it's not mandatory, i don't want to fill it in. However, the form doesn't let me submit it
=> Fixed this in ps-input-text.js, in the number case — treat an empty input as undefined (removing the key from form data) rather than converting to 0
  1. Same issue with text fields. Filling an optional text field with an invalid value (e.g. a non-ISO 8601 string in connection-expires) shows a validation error. Clearing the field sets the value to "", which still fails the pattern validator — so the error persists and the form won't submit.
=> Fixed this by changing the default case in ps-input-text.js. Clearing any text field now sets `this.value = undefined` instead of `""`, which removes the key from form data entirely, so the pattern validator is never triggered for an absent optional field

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.