Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inappropriate Validation Allows Negative Price in Product Creation. #1786

Open
ashishkumar-webkul opened this issue Dec 10, 2024 · 1 comment

Comments

@ashishkumar-webkul
Copy link
Collaborator

Bug Report

Title

Inappropriate Validation Allows Negative Price in Product Creation

Issue Description

During the creation of a product, the Price field in the Price Section accepts negative values. This behavior is incorrect, as price values should always be positive or zero (for free products). Proper validation is required to restrict negative values.

Steps to Reproduce

  1. Navigate to Admin -> Products -> Create Products.
  2. Enter a negative value in the Price field under the Price Section.
  3. Save the product.

Expected Result

The system should display a validation error message when a negative value is entered in the Price field, preventing the product from being saved.

Actual Result

The product gets saved with a negative price without any validation error.

Acceptance Criteria

  1. Implement validation to restrict negative values in the Price field.
  2. Display a clear error message if a negative value is entered.
  3. Ensure backward compatibility and test other price-related fields for similar issues.

Attachments:
https://prnt.sc/Zi86YjEb-6T_

amit-webkul added a commit to amit-webkul/laravel-crm that referenced this issue Dec 27, 2024
@ashishkumar-webkul
Copy link
Collaborator Author

Checked and Found that the validation message has been updated

https://prnt.sc/erT0e97zqwiI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants