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 added a comment - Reproducer https://github.com/jenkinsci/jenkins/pull/7666

          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

          Mark Waite added a comment -

          Merged in preparation for 2.393

          Mark Waite added a comment - Merged in preparation for 2.393

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

              Created:
              Updated:
              Resolved: