Validate a form field in input form using <leave> and <check>
Hi Sirs,
I ve been trying to create a validation for a field consisting of drop-down button/enumeration with 5 options. The goal is: if a user creates a new delivery template and leaves the field empty then an error message must pop-up once user tries to press the save button. So far i haven't been successful tho. here is the relevant part of the form.
the input:
<container>
<input required="true" xpath="@userPreference"/>
<static label="NB: Choose opt-out based on what category the email belongs to." type="help"/>
</container>
and, in the bottom part of the form file, the leave+check part
<leave name="leave">
<check expr="@userPreference!=''">
<error>test_test</error>
</check>
</leave>
</form>
What am i missing?
Cheers