<div dir="auto"><p style="font-family:sans-serif;font-size:12.8px">Hello,<u></u><u></u></p><p style="font-family:sans-serif;font-size:12.8px"><u></u> <u></u></p><p style="font-family:sans-serif;font-size:12.8px">I am trying field validation (email) from <a href="https://wiki.evolveum.com/display/midPoint/User+Interface+Form+Fields#UserInterfaceFormFields-ObjectTemplate" style="text-decoration-line:none;color:rgb(66,133,244)" rel="noreferrer noreferrer" target="_blank">https://wiki.evolveum.com/display/midPoint/User+Interface+Form+Fields#UserInterfaceFormFields-ObjectTemplate</a> in the user template in a Midpoint 4.0 instance.<u></u><u></u></p><p style="font-family:sans-serif;font-size:12.8px"><u></u> <u></u></p><p style="font-family:sans-serif;font-size:12.8px">When I input and submit some text in the email field, the validation works fine (both error and non error case). But when I submit the user form with an <b>empty email field</b>, I get the following error in the UI :<u></u><u></u></p><p style="font-family:sans-serif;font-size:12.8px"><u></u> <u></u></p><p style="font-family:sans-serif;font-size:12.8px"><b>Cannot evaluate expression: No such property: input for class: (new)__form_component_expression_validation_ in (new) form component expression validation</b><u></u><u></u></p><p style="font-family:sans-serif;font-size:12.8px"><u></u> <u></u></p><p style="font-family:sans-serif;font-size:12.8px">It looks like the first if statement <span style="font-size:10pt;font-family:'courier new'">if (input == null) {return null}</span> is not working as intended<u></u><u></u></p><p style="font-family:sans-serif;font-size:12.8px"><u></u> <u></u></p><p style="font-family:sans-serif;font-size:12.8px">See attached the full log<u></u><u></u></p><p style="font-family:sans-serif;font-size:12.8px"><br></p><p style="font-family:sans-serif;font-size:12.8px"><u></u>This validation code was working fine in Midpoint 3.9.<u></u></p><p style="font-family:sans-serif;font-size:12.8px"><br></p><p style="font-family:sans-serif;font-size:12.8px">Any workaround for this issue?<u></u><u></u></p><p style="font-family:sans-serif;font-size:12.8px"><u></u> <u></u></p><p style="font-family:sans-serif;font-size:12.8px">Should I create a new Jira issue (I found <a href="https://jira.evolveum.com/browse/MID-5505" style="text-decoration-line:none;color:rgb(66,133,244)" rel="noreferrer noreferrer" target="_blank">https://jira.evolveum.com/browse/MID-5505</a> on a similar subject, but in my case, the code is executed)?</p><div style="color:rgb(136,136,136);font-family:sans-serif;font-size:12.8px" dir="auto"><u></u><u></u></div><p style="font-family:sans-serif;font-size:12.8px"></p><div style="color:rgb(136,136,136);font-family:sans-serif;font-size:12.8px" dir="auto"><p><u></u> <u></u></p><p>-Frederic</p></div></div>