Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Inappropriate Validation Allows Negative Price in Product Creation.  #1786

@ashishkumar-webkul

Description

@ashishkumar-webkul

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_

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions