Skip to content

NumberType doesn't accept some valid values #40

@tcpalmer

Description

@tcpalmer

What version of schema-typed are you using?

2.0.2

Describe the Bug

NumberType doesn't accept values with a leading or trailing decimal point as valid. For example '.1' and '1.' are not considered valid.

Expected Behavior

Values with leading and trailing decimal points are valid numbers and should be accepted.

To Reproduce

const model = Schema.Model({
imageScale: NumberType('must be a number'),
});

See screenshot for actual result.
Screen Shot 2022-01-29 at 3 45 32 PM

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions