eclipsesource / eclipsesource/jsonforms

Firefox accepts non-number characters for fields with {type: "number"}

Open
#1,890 1 comment 0 reactions 0 assignees View on GitHub
material react
Dominant language
TypeScript
Stars
2.7k
Forks
424
Avg merge
17d 8h
Merged PRs (30d)
1

Description

### Describe the bug

Firefox accepts non-number characters for fields with `{type: "number"}` and JsonForms doesn't update corresponding `data` and even remove the corresponding key (`count` in the below example) in a such case

So there is no validation by AJV.

### Expected behavior

The best behavior is to make Firefox doesn't accept invalid characters. But if it's not possible, JsonForms shouldn't remove the corresponding key from `data`

### Steps to reproduce the issue

1. Open Firefox
2. Go to [the playground](https://mirismaili.github.io/jsonforms-playground)
3. Set **Schema** to:
```
{
"type": "object",
"properties": {
"name": {
"type": "number"
}
}
}
```
4. Set **UI-Schema** to `false` and **Data** to `{}`

### Screenshots

![image](https://user-images.githubusercontent.com/15800189/153849613-4d6dbf59-2fb8-47a4-854d-7bf4efbf8a19.png)

### In which browser are you experiencing the issue?

Firefox v94.0.1 (64-bit)

### Framework

_No response_

### RendererSet

_No response_

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.