Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NumberType doesn't accept some valid values #40

Open
tcpalmer opened this issue Jan 29, 2022 · 0 comments
Open

NumberType doesn't accept some valid values #40

tcpalmer opened this issue Jan 29, 2022 · 0 comments

Comments

@tcpalmer
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant