magento / community-features

Magento Features Development is an Initiative to Allows Community Memebers Join to Development of Magento Features
46 stars 18 forks source link

Magento frontend validation ignores formnovalidate #214

Open lukeromanowicz opened 5 years ago

lukeromanowicz commented 5 years ago

Preconditions (*)

Magento 2.2.5, by quick checking the source probably all versions.

Steps to reproduce (*)

  1. Go to any form with jquery validation, i.e. product page.
  2. Enter an invalid value to check if the validator works.
  3. add formnovalidate="formnovalidate" to validated input

Expected result (*)

Validation of this input should be completely omitted.

Actual result (*)

The validator is still validating that input.

magento-engcom-team commented 5 years ago

Hi @lukeromanowicz. Thank you for your report. To help us process this issue please make sure that you provided the following information:

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento-engcom-team give me 2.3-develop instance - upcoming 2.3.x release

For more details, please, review the Magento Contributor Assistant documentation.

@lukeromanowicz do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?

lukeromanowicz commented 5 years ago

@magento-engcom-team give me 2.3-develop instance - upcoming 2.3.x release

magento-engcom-team commented 5 years ago

Hi @lukeromanowicz. Thank you for your request. I'm working on Magento 2.3-develop instance for you

magento-engcom-team commented 5 years ago

Hi @lukeromanowicz, here is your Magento instance. Admin access: https://i-21714-2-3-develop.instances.magento-community.engineering/admin Login: admin Password: 123123q Instance will be terminated in up to 3 hours.

lukeromanowicz commented 5 years ago

Confirmed on 2.3-develop.

orlangur commented 5 years ago

@lukeromanowicz please provide ground for such expectation.

lukeromanowicz commented 5 years ago

@orlangur formnovalidate is a part of HTML5 and in my opinion should be respected by Magento validators just like it is respected by all browser validators.

orlangur commented 5 years ago

@lukeromanowicz please update steps accordingly then,

add formnovalidate="formnovalidate" to validated input

should be "to submit button".

lukeromanowicz commented 5 years ago

@orlangur imho the main reason behind formnovalidate is to add it to actual inputs, but of course, it should work for submit buttons as well. I'll add that missing feature soon.

orlangur commented 5 years ago

@lukeromanowicz thanks,

this default setting can be overridden by a formnovalidate attribute on a <button> or <input> element belonging to the form.

Got it, should work for any element in form or form itself. I believe such feature will be really welcomed.

lukeromanowicz commented 5 years ago

@orlangur I considered this problem more like an issue rather than FR but as you made it feature request, should I do the PR to 2.3-develop instead of 2.2-develop? If I remember correctly, 2.2 does not accept any new features.

orlangur commented 5 years ago

@lukeromanowicz any contribution goes 2.3-develop first, I believe there will be no reason to not backport such improvement.

m2-assistant[bot] commented 4 years ago

Hi @manuelson. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down: