fix(projects): bound budget amount, fix hours message, cap description #214

Merged
nrupard merged 2 commits from fix/mapps-212-new-project-form-validation into main 2026-06-16 16:06:07 +02:00
Owner

The New Project and Edit Project forms had three client-side validation gaps. Budget Amount had no maximum-magnitude bound, so an out-of-range value (e.g. 41 digits) passed client validation and overflowed opaquely server-side; it now rejects values above a documented BUDGET_AMOUNT_MAX (mirroring the server's DECIMAL budget column) and negatives with a field-level message, reinforced by min/max attributes on the input. Budget Hours rejected a negative like -9 with the misleading "must be a number" message; a new validate_budget_hours helper distinguishes a well-formed but out-of-range value (negative or zero) from genuinely non-numeric input, reporting "Budget hours must be greater than 0." for the former. Description had no length cap; the Textarea component gained a maxlength prop, applied to both forms via a documented PROJECT_DESCRIPTION_MAX.

#MAPPS-212

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

The New Project and Edit Project forms had three client-side validation gaps. Budget Amount had no maximum-magnitude bound, so an out-of-range value (e.g. 41 digits) passed client validation and overflowed opaquely server-side; it now rejects values above a documented `BUDGET_AMOUNT_MAX` (mirroring the server's DECIMAL budget column) and negatives with a field-level message, reinforced by `min`/`max` attributes on the input. Budget Hours rejected a negative like `-9` with the misleading "must be a number" message; a new `validate_budget_hours` helper distinguishes a well-formed but out-of-range value (negative or zero) from genuinely non-numeric input, reporting "Budget hours must be greater than 0." for the former. Description had no length cap; the Textarea component gained a `maxlength` prop, applied to both forms via a documented `PROJECT_DESCRIPTION_MAX`. #MAPPS-212 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
fix(projects): bound budget amount, fix hours message, cap description
All checks were successful
Check / clippy + fmt + tests (pull_request) Successful in 1m51s
436283c7cf
The New Project and Edit Project forms had three client-side validation gaps. Budget Amount had no maximum-magnitude bound, so an out-of-range value (e.g. 41 digits) passed client validation and overflowed opaquely server-side; it now rejects values above a documented `BUDGET_AMOUNT_MAX` (mirroring the server's DECIMAL budget column) and negatives with a field-level message, reinforced by `min`/`max` attributes on the input. Budget Hours rejected a negative like `-9` with the misleading "must be a number" message; a new `validate_budget_hours` helper distinguishes a well-formed but out-of-range value (negative or zero) from genuinely non-numeric input, reporting "Budget hours must be greater than 0." for the former. Description had no length cap; the Textarea component gained a `maxlength` prop, applied to both forms via a documented `PROJECT_DESCRIPTION_MAX`.

#MAPPS-212

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Merge remote-tracking branch 'origin/main' into fix/mapps-212-new-project-form-validation
All checks were successful
Check / clippy + fmt + tests (pull_request) Successful in 1m8s
Create release / Create release from merged PR (pull_request) Has been skipped
a9f92018c4
nrupard deleted branch fix/mapps-212-new-project-form-validation 2026-06-16 16:06:07 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
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!214
No description provided.