Skip to content
Snippets Groups Projects

Issue #395 - Update Validation for Inputs that should be numeric to resolve...

Merged Dima Rifai requested to merge delrifai/#395_2_validate_numeric_values_search_ranges into develop

Issue #395 (closed) - Update Validation for Inputs that should be numeric to resolve browser compatibility issues

The issue we are facing is related to how different browsers handle the input[type="number"] field and how they enforce restrictions for numbers. Chrome & Firefox handle validation for these fields differently. When type="number" is set in an input field, the browser automatically restricts input to numeric characters only. As a result, if you try typing a string (e.g., letters), the input won't trigger the onChange event as it does for valid numbers.

Workaround: made the input as text and added validation to ensure the input is correct The validation removes any :

  1. letters
  2. , or decimals that cause Bad Requests
  3. Allowed decimal values only when setting last days/weeks/months

Merge request reports

Pipeline #112264 failed

Pipeline failed for 6421508a on delrifai/#395_2_validate_numeric_values_search_ranges

Merged by mcfarhatmcfarhat 2 months ago (Jan 2, 2025 2:21pm UTC)

Loading

Pipeline #112310 failed

Pipeline failed for 6421508a on develop

Deployed to te‎st‎ 2 months ago

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading