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

Admin side internal server error when search fields exceed max length #666

Open
ianliuwk1019 opened this issue Jul 31, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@ianliuwk1019
Copy link
Collaborator

ianliuwk1019 commented Jul 31, 2024

Describe the Bug
The search fields ("FOM Number" and "FSP ID") for the admin search are digits only, and should be restricted to 9 digits. But currently, user can input more than 9 digits and will encounter internal server error.

Expected Behaviour
Frontend admin UI search page:

  • Digits only fields.
  • Restrict to only 9 digits max.
  • If possible, remove leading '0' from user input.

Actual Behaviour
When more than 10 digits will have internal server error.

Screenshots
FSP ID:
image

FOM Number:
image

Desktop (please complete the following information):

  • On TEST environment.
  • This bug does not appear on local (it might be due to the fields uses some inline javascript and conflict to the content security policy that is applied on higher environment but not locally).

Additional context

  • The FOM Number and FSP ID field in database is Integer type, so no leading '0', meaning if user enters leading '0', it will be ignored and removed when saving into database.
  • Currently the implementation is using <input type="number>, may need to switch by using type="text". Public side has this case.
  • It might possibly be (just a thought) better to use custom (need to self build) Angular directive to restrict input to digit and max length 9). It might lead to better user input experience than just using <input type="text"> with event-listener to modify the input (like what public side does now).
@ianliuwk1019 ianliuwk1019 added the bug Something isn't working label Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant