-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Area: FrontendComponent: MessageFixed in 2.4.xThe issue has been fixed in 2.4-develop branchThe issue has been fixed in 2.4-develop branchIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchThe issue has been reproduced on latest 2.4-develop branch
Description
Preconditions (*)
- Vagrant box, Debian 9
- Magento 2.2.9
- Chrome 78
- Create a virtual product with Customizable Options:
- Option Title: Message
- Option Type: Area
- Max Characters: 20
- Don't forget to add a price and stock
Steps to reproduce (*)
- Try to put this product in your basket with a message 'Is twenty characters' => OK on front and can add to cart.
- Try to put this product in your basket with a message with a newline:
'Is
twenty
characters'
=> Ok on front, but error on adding to cart: 'The text is too long.'
Expected result (*)
- If the Javascript validator validates the input, it should be valid on server-side as well.
Actual result (*)
- Error shown although the Javascript validator passed.
Summary
The Javascript validator counts newlines as a single character (\n).
On the server side (\Magento\Catalog\Model\Product\Option\Type\maxCharacters) newlines are counted as 2 characters (\r\n).
Metadata
Metadata
Assignees
Labels
Area: FrontendComponent: MessageFixed in 2.4.xThe issue has been fixed in 2.4-develop branchThe issue has been fixed in 2.4-develop branchIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchThe issue has been reproduced on latest 2.4-develop branch