required validation in reletedItem search fails in any case
Description
Environment
is duplicated by
Activity

Kathleen Neumann August 12, 2021 at 4:11 PM
This looks like a good solution for me.
Torsten Krause July 30, 2021 at 5:21 PM(edited)
Then again, introduces type dependent validation messages, which is desirable, so I’d suggest the following fix, that combines both approaches:
Add a new template in
mir2xeditor.xsl
:
2. Use this templte instead of mir-required
in mir:relItemsearch
.
Torsten Krause July 30, 2021 at 2:54 PM
Correction again. The proposed validation rules provide a solution for the actual issue (i.e. it should be validated the a related item has either a title or a link to another object).
But this is subverted by the changes mady in . The added required="true"
attributes in all title.***.relItemsearch
templates introduce an ovely simplistic validation (<xed:validate required="true" display="global">
, via mir:relItemsearch
and mir-required
) that requires that a title is present, although another option is also valid.
Torsten Krause July 30, 2021 at 2:13 PM
Okay, correction, after updating from 2019.x.x to 2020.x.x, this problem also exists for me, so the modidfication of the validations rules alone is no solution to the problem.
Torsten Krause July 28, 2021 at 7:42 AM(edited)
This is how I solved the problem, after taking into account the responses to my mail to the developer group (“Gedächtnisbehaftete Validierung beim Anlegen einer "erschienen in ..."-Beziehung“) from june 2020.
The test test="(text()!='') or (../../@xlink:href!='')"
is basically a logical implication that says “if no textual title is present, a link to another objet must be present“ (because (A ⇒ B) ≡ (¬A ∨ B)
), or in other words: “the textual title is required, if no related object has been selected“
Dynamic Editor -> RealtedItem Search
used Template: <mir:relItemsearch ..required="true" >
The Validation of e.x. required Title fails in any case, when using firefox. Chrome works. The reason is, that firefox doesn't send the value of a disabled field.