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

Fix issue #1101: "Please enter enabled" error was resolved #1119

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Sujan14728
Copy link

Description

When the admin wants to add new product category, the enabled switch was initially undefined. Due to which the enabled switch had to be pressed twice to make it true otherwise it shows error while submitting the form. I resolved it by assigning initial values of enabled so that admin does not get validation error while submitting the form.

Related Issues

The form displayed an error message saying "Please enter enabled" when initially rendered. This was due to the 'enabled' field not having a initial value set, causing validation to fail on initial page load.

Steps to Test

  1. Go to productCategory
  2. Click on Add new and add the name ,description ,color
  3. Submit and the error "Please enter Enabled" is gone.(Previously you have to click the switch twice to make the enabled value to be true)

Testing

  • Verified that the form loads without showing the "Please enter enabled" error message.
  • Tested various form submissions to ensure validation works as expected with the initial value set to true.

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

Successfully merging this pull request may close these issues.

1 participant