Skip to content

Add checks on creating/editing discount codes #5874

@shreyanshdwivedi

Description

@shreyanshdwivedi

Describe the bug

Currently their is no server side validation of data sent on creating/editing a discount code.
If we try to enter amount > the ticket price, it is accepted.
If we try to enter % greater than 100, it is accepted

To Reproduce
Steps to reproduce the behavior:

  1. Go to Manage Events
  2. Click on Tickets
  3. Scroll down to Discount Codes and try creating discount code with wrong data
  4. See error

Expected behavior

A check should be implemented on -

  • Discount Amount
  • Discount %

Additional context

Working on it

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions