[Form Validation] not working for number inputs
See original GitHub issueI’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:
- Created 6 years ago
- Comments:10 (5 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@geekyd Thank you, confirming the issue. It seems that you either have to set
optional
tofalse
, or use thetext
type instead of thenumber
.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!