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

Typing char or string in integer type field is possible on Firefox, no validation message #1094

Closed
AoNoOokami opened this issue Jul 15, 2020 · 3 comments
Labels
bug Breaks something but is not blocking f: editor Concerns editor based on JSON schema AND custom editor p-Low Low priority stale Stale or no longer relevant

Comments

@AoNoOokami
Copy link
Contributor

AoNoOokami commented Jul 15, 2020

Describe the bug
It is possible to type char, for example 'a', 'b' or 'c', or even string, in integer-type fields when using the editor in Firefox. There is no validation error message to warn the user.
Example: provisionActivity.startDate - when adding a letter, the field validation message is "This field is required" ; when adding an integer with only one character (instead of 4), there is no field validation message but a global error on the form "The form contains errors.".
Example: partOf - year and pages have a validation (impossible to save a string not integer), but not numbering and volume (we can save a string not integer without error message, but they are not saved).

To Reproduce
Steps to reproduce the behavior:

  1. Go to the document editor
  2. Display 'part of' field
  3. Type something in volume or issue field
  4. The record can't be saved. There is no validation message to warn about the wrong type of data.

Expected behavior
It shouldn't be possible to type anything else than an integer in those fields.

Context
This is related to the behaviour of ngx-formly. Therefore, an issue was reported on the repo: ngx-formly/ngx-formly#2360

Screenshots
If applicable, add screenshots to help explain your problem.

@AoNoOokami AoNoOokami added triage bug Breaks something but is not blocking f: editor Concerns editor based on JSON schema AND custom editor labels Jul 15, 2020
@iGormilhit iGormilhit removed the triage label Jul 16, 2020
@iGormilhit iGormilhit added the p-Low Low priority label Nov 26, 2020
@iGormilhit
Copy link

@AoNoOokami ngx-formly/ngx-formly#2360 seems to be closed, but I still can reproduce it in v0.14.1. Is it because we have to update ngx-formly in ng-core?

@AoNoOokami
Copy link
Contributor Author

I think so. I will check that while testing rero/rero-ils-ui#445 and related PRs.

@AoNoOokami
Copy link
Contributor Author

AoNoOokami commented Jan 27, 2021

I tested it on v0.15.0. There is an error if we type char in date 1 of provision activity field, but the message says: This field is required. If I type a date, for example `2020 the field is validated.

@pronguen pronguen added p-Medium Medium priority (to be solved within 1-2 years) and removed p-Low Low priority labels May 26, 2021
@PascalRepond PascalRepond added p-Low Low priority and removed needs info p-Medium Medium priority (to be solved within 1-2 years) labels Aug 29, 2022
@PascalRepond PascalRepond added the stale Stale or no longer relevant label Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Breaks something but is not blocking f: editor Concerns editor based on JSON schema AND custom editor p-Low Low priority stale Stale or no longer relevant
Projects
None yet
Development

No branches or pull requests

4 participants