The Add Product(NewProductModal )component currently allows users to input a product's quantity without any restrictions on the type of input. To ensure data integrity and avoid errors, the quantity input should be restricted to numeric values only, with a minimum value of 0.
Acceptance Criteria
[ ] The quantity field in the Add Product NewProductModal component only accepts numeric input.
[ ] The minimum allowable value for quantity is 0, and negative values are not permitted.
[ ] The form submission is blocked if the quantity is not a valid number, and an error message is displayed.
[ ] The UI clearly indicates that the quantity field accepts numbers only, with appropriate guidance for the user.
Update the Quantity Input Field:
Change the input type of the quantity field to number to restrict the input to numeric values only.
Add a min attribute with a value of 0 to ensure that users cannot enter negative quantities.
Validation:
Implement client-side validation to ensure that only numbers are entered in the quantity field.
Display an appropriate error message if a user attempts to submit a negative value or an invalid entry.
UI/UX Enhancements:
Ensure the quantity input field is clearly marked as a numeric field, possibly by displaying an up/down control (if supported by the UI framework).
Description
The Add Product(NewProductModal )component currently allows users to input a product's quantity without any restrictions on the type of input. To ensure data integrity and avoid errors, the quantity input should be restricted to numeric values only, with a minimum value of 0.
Acceptance Criteria
Update the Quantity Input Field:
Validation:
UI/UX Enhancements: Ensure the quantity input field is clearly marked as a numeric field, possibly by displaying an up/down control (if supported by the UI framework).
Links
|
FIGMA LINK
Images