Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-70662

Built-in validations are broken when inside an `optionalBlock`

    • 2.393, 2.387.1

      If a global configuration uses `optionalBlock` and it contains built-in validations (for example `min` or `max` for an integer), then `/manage/configure` fails to save with the following JS error:

      ```
      An invalid form control with name='_.someValue' is not focusable
      ```
      Reproduced on 2.387.

      This seems to be a regression from the previous LTS.

          [JENKINS-70662] Built-in validations are broken when inside an `optionalBlock`

          Antonio Muñiz created issue -

          Antonio Muñiz added a comment - Reproducer https://github.com/jenkinsci/jenkins/pull/7666
          Daniel Beck made changes -
          Labels New: lts-candidate regression

          Antoine Neveux added a comment - First commit introducing the bug: https://github.com/jenkinsci/jenkins/commit/5870838f690eaa06762630eceb21c40d3df0ceb8

          Seems to be due to hidden input native validation. Explained in https://stackoverflow.com/a/28340579
          Thanks Vincent for the pointer!

          Wadeck Follonier added a comment - Seems to be due to hidden input native validation. Explained in https://stackoverflow.com/a/28340579 Thanks Vincent for the pointer!

          Antoine Neveux added a comment - https://github.com/jenkinsci/jenkins/pull/7668
          Alexander Brandes made changes -
          Remote Link New: This issue links to "https://github.com/jenkinsci/jenkins/pull/7668 (Web Link)" [ 28499 ]
          Alexander Brandes made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Alexander Brandes made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]

          Mark Waite added a comment -

          Merged in preparation for 2.393

          Mark Waite added a comment - Merged in preparation for 2.393
          Mark Waite made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Review [ 10005 ] New: Fixed but Unreleased [ 10203 ]

            aneveux Antoine Neveux
            amuniz Antonio Muñiz
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: