fix(billing): validate New Invoice fields client-side #217
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/MAPPS-214-invoice-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 Invoice form let several bad line/header values through to an opaque 422. Add
step="0.01"andmin="0"to Unit Price so it accepts cents and rejects negatives,step="0.01"/min="0"to Quantity, and a submit-time check that flags a negative Quantity/Unit Price at the field instead of only in the generic banner. Add a Due Date >= Invoice Date check (ISO date lexicographic compare) that surfaces a field message before submit. Add clientmaxlengthto Description (1000), PO Number (100), and Notes (2000) matching the server validator caps, and add the missingpo_number/noteslength validators on the invoice create/from-time-entries/update requests so client and server agree. Addmaxlengthprops to the shared Input and Textarea components.#MAPPS-214