Uploaded image for project: 'PUBLIC - Liferay Alloy UI'
  1. PUBLIC - Liferay Alloy UI
  2. AUI-762

FormValidator: Add an opportunity to turn on/off any predefined rules

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Form - JS (deprecated)
    • Environment:
      Liferay 6.1.1 with built-in AlloyUI

      Description

      Example:
      we have a form with 3 fields (field1, field2, field3). They are set to required and some validation rules are specified with FormValidator. Depending on some conditions we need to disable field2 validation, but proceed with field1 and field3 validation as well. There is need to add a property "enabled" (boolean) to each rule, true by default, and methods disableRule(ruleName) - prevent execution of selected rule, enableRule(ruleName) - enable execution of rule and isRuleEnabled(ruleName) - check, is rule enabled or disabled, to perform basic operations with existing rules. Property and methods could be added to the FormValidator component.

        Attachments

          Activity

            People

            Assignee:
            ui_alloy UI Alloy
            Reporter:
            psavinov Pavel Savinov (Inactive)
            Participants of an Issue:
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              6 years, 27 weeks, 4 days ago

                Packages

                Version Package