question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Form validation issue

See original GitHub issue

Scope: Condition and form validation

Description

I’ve encountered a problem with form validation when using condition isNotEmpty.

I’ve got a form with three radio button options. The first two display a select list, the third does not.

On selection of the first two options the form is only valid when the select list is filled in. The third option should be always valid as there is nothing to be filled in.

When the select list for the first two options is filled in, I would like to display an additional field.

For that I’m using isNotEmpty condition:

condition: {

  when: 'field-with-select-list',

  isNotEmpty: true,

},

Problem The form isn’t valid when the third option is selected, but when I select one of the two with select list, fill it in and then select the third option, the form is suddenly valid.

Expected behavior When selecting the third option, the form is valid.

Screencap ddf-issue

Issue Analytics

  • State:closed
  • Created 9 months ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
regexowlcommented, Dec 12, 2022

@Hyperkid123 That did the trick, amazing! Thanks a lot!

0reactions
regexowlcommented, Dec 8, 2022

@Hyperkid123 thank you! I’ll give it a try.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Form Validation Errors - how to track them and what to do ...
1) a user entered an invalid data into a form field, for example, an email without "@" character · 2) a user entered...
Read more >
Common validation errors when creating issue forms
Common validation errors when creating issue forms · In this article · Required top level key name is missing · key must be...
Read more >
Client-side form validation - Learn web development | MDN
This is called client-side form validation, and helps ensure data submitted matches the requirements set forth in the various form controls.
Read more >
Form-Field Validation: The Errors-Only Approach
When the user first submits the page, the entire page is reloaded, but with indications of validation errors. A message at the top...
Read more >
Form Validation: Why It Matters and How to Get It Right - CXL
Form validation is a “technical process where a web-form checks if the information provided by a user is correct.” The form will either...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found