ManageIQ / ui-components

Angular UI Components for ManageIQ
Apache License 2.0
16 stars 52 forks source link

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

Closed himdel closed 5 years ago

himdel commented 5 years ago

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 https://github.com/ManageIQ/ui-components/pull/388 which changed validator_type from undefined to false when disabled. false gets saved by automate as "f", which is not falsy.

himdel commented 5 years ago

Cc @eclarizio

simaishi commented 5 years ago

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