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
Updated by Nazmul Hossain Shovon 10 months ago
- Status changed from Pending to In Progress
- Assignee set to Md. Abdul Hamid
- it is more flexible to allow decimal values in buying and selling price
- we will increment buying and selling price by 1
Updated by Md. Abdul Hamid 10 months ago
- Assignee changed from Md. Abdul Hamid to Nazmul Hossain Shovon
- User can not type negative number in any number input field.
Updated by Nazmul Hossain Shovon 10 months ago
- Assignee changed from Nazmul Hossain Shovon to Md. Abdul Hamid
Updated by Md. Abdul Hamid 10 months ago
- File Product create form.png Product create form.png added
Need to add an Asterisk on every mandatory field. Some Alignment issues are there.
Updated by Md. Abdul Hamid 10 months ago
- Assignee changed from Md. Abdul Hamid to Najmul Hasan
Actions