Multiple validations

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Multiple validations

mbojja
Hi Alex - If there are multiple validations on a field, is there a way to validate in an order and display error messages accordingly instead of displaying all at once?

Thanks

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/e463dd58-2040-4c2e-91ca-bee5d3cab89e%40googlegroups.com.

multiple validations.PNG (8K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Multiple validations

Alessandro  Vernet
Administrator
Hi Manish,

You can't define an order through the UI, but you can do so through your
XPath expressions. Say you have 3 XPath expressions: `a`, `b`, and `c`, then
you can rewrite them as `a` (unchanged), `b and not(a)`, `c and not(a) and
not (b)`. This way, at most one error will show, and if there are multiple
problems, they will show in the order you specified. You'll let me know if
this works for you!

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1587418871720-0.post%40n4.nabble.com.
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet