8000 data-rule-number broken · Issue #1754 · jquery-validation/jquery-validation · GitHub
[go: up one dir, main page]

Skip to content
data-rule-number broken #1754
Closed
Closed
@jinglesthula

Description

@jinglesthula

Subject of the issue

data-rule-number doesn't work in 1.15.0 (although it the rule does work if you pass rules: {foo: {number: true}} in the options instead of using the data-rule-* attribute approach).

Your environment

Steps to reproduce

https://jsfiddle.net/jinglesthula/amaxhbyq/
Enter abcd in the field and try to submit. It accepts the non-numeric value. The person who reported the bug to me mentioned that some of the other rules also weren't working using data-rule-* attributes, but I have a hunch they all stem from how numeric values are handled.
(Note: you can verify that the plugin itself is running by leaving it blank to see the required rule apply correctly.)

Also, I discovered that it was working in 1.13.1: https://jsfiddle.net/jinglesthula/swtb3Lf5/

Expected behaviour

It should show the Please enter a valid number message and prevent form submission.

Actual behaviour

Doesn't appear to be applying the rule

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0