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

Dialog user - only run regex validation when validator_type is set to regex #397

Merged
merged 2 commits into from Jun 27, 2019
Merged

Dialog user - only run regex validation when validator_type is set to regex #397

merged 2 commits into from Jun 27, 2019

Conversation

himdel
Copy link
Contributor

@himdel himdel commented Jun 25, 2019

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1721814

The dialog-user component is only looking at validator_rule, not validator_type.
Thus, it attempts to run regex validation even when validation is disabled.

This is a follow-up to #388 which changed validator_type from undefined to false when disabled. false gets saved by automate as "f", which is not falsy.

we're saving `false` now in `validator_type` when validation is disabled, which gets serialized as `"f"`

adding a spec that no regex validation is attempted unless `validator_type` is explicitly `regex`

https://bugzilla.redhat.com/show_bug.cgi?id=1721814
@himdel
Copy link
Contributor Author

himdel commented Jun 25, 2019

Cc @eclarizio

@martinpovolny martinpovolny merged commit 8d67e39 into ManageIQ:master Jun 27, 2019
@martinpovolny martinpovolny added this to the Sprint 115 Ending Jul 8, 2019 milestone Jun 27, 2019
@martinpovolny martinpovolny self-assigned this Jun 27, 2019
@himdel himdel deleted the validator-bz1721814 branch June 27, 2019 09:11
simaishi pushed a commit that referenced this pull request Jul 2, 2019
Dialog user - only run regex validation when validator_type is set to regex

(cherry picked from commit 8d67e39)

https://bugzilla.redhat.com/show_bug.cgi?id=1726438
@simaishi
Copy link

simaishi commented Jul 2, 2019

Hammer backport details:

$ git log -1
commit fbf75de618add0ed42a5786de3a96b16147c177c
Author: Martin Povolny <mpovolny@redhat.com>
Date:   Thu Jun 27 09:26:11 2019 +0200

    Merge pull request #397 from himdel/validator-bz1721814
    
    Dialog user - only run regex validation when validator_type is set to regex
    
    (cherry picked from commit 8d67e39be2584d1d4d9446a2dff1a9884af99335)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1726438

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

Successfully merging this pull request may close these issues.

None yet

4 participants