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] not working for number inputs

See original GitHub issue

I’m using semantic ui form validation in one of my projects in ember. The validation does not work for number type input.

Code Snippet:

level: {
          identifier : 'level',
          optional   : true,
          rules      : [
            {
              type   : 'integer',
              prompt : this.l10n.t('Please enter a number')
            }
          ]
        }

Template

{{input type='number' value=sponsor.level name='level' min=0}}

Note: Validation works if I remove optional: true

Please guide. Thanks

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
awgvcommented, Jul 11, 2017

@geekyd Thank you, confirming the issue. It seems that you either have to set optional to false, or use the text type instead of the number.

0reactions
stale[bot]commented, Jun 5, 2018

There has been no activity in this thread for 90 days. While we care about every issue and we’d love to see this fixed, the core team’s time is limited so we have to focus our attention on the issues that are most pressing. Therefore, we will likely not be able to get to this one.

However, PRs for this issue will of course be accepted and welcome!

If there is no more activity in the next 90 days, this issue will be closed automatically for housekeeping. To prevent this, simply leave a reply here. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Input field with type number validation not working
Here is my code, I am trying to validated my input but validations not working <form class ...
Read more >
<input type="number"> - HTML: HyperText Markup Language
<input> elements of type number are used to let the user enter a number. They include built-in validation to reject non-numerical entries.
Read more >
6 Reasons - HTML5 Required Attribute Validation not Working
6 Reasons – HTML5 Required Attribute Validation not Working · 1. The Form Tag has “novalidate” Attribute · 2. Required Attribute Validation doesn' ......
Read more >
Why the number input is the worst input - Stack Overflow Blog
If you need a number input that has no conditional validation (i.e. number is always within a certain range of min/max) and has...
Read more >
HTML5 Form Validation Examples < HTML - The Art of Web
The slider option is a bit bizarre in that no values are displayed, but may be useful for more 'analog' inputs. There are...
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