Skip to content

Number cannot accept negative values #548

Description

@thevikas

var numeric = /^[0-9]*\.?[0-9]*?$/.test(newVal);

A Number can also be a negative which starts with a dash. The regex fails to accept this sort of numbers. The same field shows a slider on the right. One can that slider to get to negative numbers and that is fine and passes validation since no keypress was done.

Any suggestion on how to get around it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions