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

Some of JS validation rules making fields required #16544

Closed
VitaliyBoyko opened this issue Jul 4, 2018 · 4 comments
Closed

Some of JS validation rules making fields required #16544

VitaliyBoyko opened this issue Jul 4, 2018 · 4 comments
Assignees
Labels
Component: Ui Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release

Comments

@VitaliyBoyko
Copy link
Contributor

VitaliyBoyko commented Jul 4, 2018

Hi, dear Magento Comunity Engineering team.
In some cases quite useful to have validation only for the filled fields. For example:
we have on the form field phone which is not required, but it required to have valid data when user will fill out this field. In case if a user did not fill out anything error should not be displayed.
Bunch of validation rules makes this not possible.

On the screenshot, I've selected more important validation rules for my opinion. Some of them work fine, others have unexpected behavior.

new form content magento admin

Here form source to more convenient reproducing.

Preconditions

  1. Create a new module with form and field, or add a field to existing form
  2. Set field validation, for example:
    <validation> <rule name="phoneUS" xsi:type="boolean">true</rule> </validation>
  3. Field should not be required

Steps to reproduce

  1. Don't fill out the field just submit a form

Expected result

  1. The form is submitting as well

Actual result

  1. Form not being submitted, field validation process error
@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Jul 4, 2018
@magento-engcom-team
Copy link
Contributor

magento-engcom-team commented Jul 4, 2018

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

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

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 {$VERSION} instance

where {$VERSION} is version tags (starting from 2.2.0+) or develop branches (2.2-develop +).
For more details, please, review the Magento Contributor Assistant documentation.

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

  • yes
  • no

@engcom-backlog-nickolas engcom-backlog-nickolas added Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release Component: Ui labels Jul 5, 2018
@engcom-backlog-nickolas
Copy link

Hello @VitaliyBoyko, thank you for your report.
We've acknowledged the issue and added to our backlog.

@magento-engcom-team
Copy link
Contributor

Hi @VitaliyBoyko. Thank you for your report.
The issue has been fixed in #16724 by @VitaliyBoyko in 2.2-develop branch
Related commit(s):

The fix will be available with the upcoming 2.2.7 release.

@magento-engcom-team magento-engcom-team added the Fixed in 2.2.x The issue has been fixed in 2.2 release line label Aug 8, 2018
@ishakhsuvarov ishakhsuvarov added the Fixed in 2.3.x The issue has been fixed in 2.3 release line label Sep 12, 2018
@ishakhsuvarov
Copy link
Contributor

Hi @VitaliyBoyko. Thank you for your report.
The issue has been fixed in #17724 by @nmalevanec in 2.3-develop branch
Related commit(s):

The fix will be available with the upcoming 2.3.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Ui Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

No branches or pull requests

4 participants