fix(billing): constrain New Tax Rate Rate (%) and Name inputs (MAPPS-220) #375

Merged
Claude-Run merged 1 commit from fix/MAPPS-220-tax-rate-input-constraints into main 2026-06-28 03:28:31 +02:00
Member

The Settings > Tax Rates > New Tax Rate form left Rate (%) with no min/max/step, so it inherited the browser default step=1: it rejected 2-decimal rates like 8.25 (its own placeholder) as a step mismatch while accepting negatives and values over 100%. Name had no client length cap despite the server bounding it to 100 chars.

Mirror the Ticket Priorities SLA-multiplier field: add step="0.01" min="0" max="100" to the Rate input and tighten its FormGuard Number rule to max=Some(100.0) max_decimals=Some(2), so 8.25 is accepted while negatives and >100% are rejected with field-level feedback. Add maxlength=100 plus Rule::MaxLen(100) to Name to match UpsertTaxRateRequest's length(max = 100).

#MAPPS-220

The Settings > Tax Rates > New Tax Rate form left Rate (%) with no min/max/step, so it inherited the browser default step=1: it rejected 2-decimal rates like 8.25 (its own placeholder) as a step mismatch while accepting negatives and values over 100%. Name had no client length cap despite the server bounding it to 100 chars. Mirror the Ticket Priorities SLA-multiplier field: add step="0.01" min="0" max="100" to the Rate input and tighten its FormGuard Number rule to max=Some(100.0) max_decimals=Some(2), so 8.25 is accepted while negatives and >100% are rejected with field-level feedback. Add maxlength=100 plus Rule::MaxLen(100) to Name to match UpsertTaxRateRequest's length(max = 100). #MAPPS-220
fix(billing): constrain New Tax Rate Rate (%) and Name inputs (MAPPS-220)
All checks were successful
Check / fmt + clippy + tests (pull_request) Successful in 1m22s
Create release / Create release from merged PR (pull_request) Has been skipped
2d6eaba827
The Settings > Tax Rates > New Tax Rate form left Rate (%) with no min/max/step, so it inherited the browser default step=1: it rejected 2-decimal rates like 8.25 (its own placeholder) as a step mismatch while accepting negatives and values over 100%. Name had no client length cap despite the server bounding it to 100 chars.

Mirror the Ticket Priorities SLA-multiplier field: add step="0.01" min="0" max="100" to the Rate input and tighten its FormGuard Number rule to max=Some(100.0) max_decimals=Some(2), so 8.25 is accepted while negatives and >100% are rejected with field-level feedback. Add maxlength=100 plus Rule::MaxLen(100) to Name to match UpsertTaxRateRequest's length(max = 100).

#MAPPS-220
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-apps!375
No description provided.