fix(projects): bound budget amount, fix hours message, cap description #214
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/mapps-212-new-project-form-validation"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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 bymin/maxattributes on the input. Budget Hours rejected a negative like-9with the misleading "must be a number" message; a newvalidate_budget_hourshelper 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 amaxlengthprop, applied to both forms via a documentedPROJECT_DESCRIPTION_MAX.#MAPPS-212
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com