Fix blank confirmation field does not prevent form submit#2002
Conversation
WalkthroughThe changes introduce a conditional check in the Changes
Possibly related PRs
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
Outside diff range and nitpick comments (1)
js/formidable.js (1)
Line range hint
12-24: Consider adjusting the fee structure or discount policy.The implementation of a flat $20 fee on discounted bills could negate the benefit of the discount, especially for smaller purchases or marginal loyalty tiers. This might lead to customer dissatisfaction, as the intent to reward loyalty paradoxically increases the bill.
Consider revising either the discount percentages or the flat fee application to better align with customer incentives. For example:
- Apply the fee only to undiscounted purchases
- Tier the fee amount based on the discount percentage
- Waive the fee for purchases under a certain amount
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- js/formidable.js (1 hunks)
Additional comments not posted (1)
js/formidable.js (1)
Line range hint
1-2: LGTM!The function logic is correct, and the implementation is accurate.
This fixes an issue I noticed when testing #1995
That update didn't introduce the issue though. It exists on master.
To replicate
Expected result
The form never submits.
Actual result
The page reload with an error. The JS validation misses the issue and the PHP validation catches it instead.