Actions
BUG #2428
open[SQA] Enforce Validation in "Create A New Product" Form – Generic Fields Required, Price Constraints
Description
To ensure data consistency and prevent invalid entries, the Create A New Product form needs to enforce validation rules for mandatory fields and pricing logic.
Required Updates:¶
1. Mandatory Fields¶
- Generic Name and Generic Category:
- These fields must be mandatory.
- The system should prevent product creation if either is left empty.
- Show an inline error message if not filled.
2. Buying Price & Selling Price Validation¶
- Must not allow negative values.
- Input validation should restrict numbers below 0.
3. Price Step Constraint¶
- Both Buying Price and Selling Price fields should:
- Only accept whole numbers, not decimal values.
- Prices should increase in increments of 5 or 10 units.
- Example: Allowed values → 50, 55, 60 (if 5-unit step is used).
- Show validation message for invalid input like 54, 11.25, -10.
Suggested Field Constraints:¶
| Field | Validation |
|---|---|
| Generic Name | Required, non-empty |
| Generic Category | Required, non-empty |
| Buying Price | ≥ 0, Integer only, step of 5 or 10 |
| Selling Price | ≥ 0, Integer only, step of 5 or 10 |
Files
Actions