When you have a field in a form, that is coming from a different level/layer than another one, you cannot "combine" them for form validation.
The first call to the checkMethod will be done correctly, but then, the second will lack the second value.
This is due to the 2 following behavior in hudson-behavior.js:
The first one will register the validator we want, and trigger a first call. This is working fine. But then, the second rule will put the nameref attribute, which limit the boundaries of the level/layer of the form.
This is impacting the validation when you have a f:hetero-radio. For example, look at credentials-plugin, version 2.3.x, in CertificateCredentialsImpl/credentials.jelly. The password and the hidden file input are on two different levels, and try to communicate together. The first call include the password and thus the validation message is OK, but the second call (due to the radio entry once loaded is triggering "applySubtree" and so, triggering the validation) is lacking the password and thus failing the validation with a warning.
- is related to
-
JENKINS-16676 RelativePath dependent field validations do not work
-
- Open
-
interestingly I have something using FormValidation with a @RealativePath(..) that will that not send the entry on the first call but is present on subsequent calls :-o
it only seems to ever work if the element that is matched with the RelativePath also has an individual check, perhaps this is the issue?
Jenkins 2.426.3 FWIW