Set property with regex to a form control via properties.

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

Set property with regex to a form control via properties.

inigo10rodri
Hi,

Instead of using regular expressions for the validations of each form
control, the client prefer to do it via properties.
So is there any other solution to be able to use those regular expressions
in the properties, instead of each form control?

Thanks,
Iñigo.

--
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 post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Set property with regex to a form control via properties.

Erik Bruchez
Administrator
Iñigo,

What do you mean by using those regular expressions in the properties? Do
you have an example?

-Erik

--
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 post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Set property with regex to a form control via properties.

inigo10rodri
Hi Erik,

What I want to say is if there is any way to validate with regex by the
input type or something similar.

It could be something like this?:

<property as="xs:integer" name="oxf.fr.format.input.number" value="true"
validation="matches(.,'^(\d{9}|\d{3}\s\d{2}\s\d{2}\s\d{2})"/>?

It would be possible or we can only do the validation by adding a formula in
the control options?

Hope you can answer soon, thanks.
Iñigo.

--
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 post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Set property with regex to a form control via properties.

Alessandro  Vernet
Administrator
Hi Iñigo,

I think you can do what you are looking for by creating an XML Schema that defines a simple type for the format you expect. Next, in Form Builder, form authors can attach the schema you created to the form, and the type you created will show up in the dropdown so they can just select it without having to enter an XPath expression with a regular expression. For more on this see the page linked below. You'll let me know if this works for you.


A;ex

On Thu, Aug 9, 2018 at 8:31 PM inigo10rodri <[hidden email]> wrote:
Hi Erik,

What I want to say is if there is any way to validate with regex by the
input type or something similar.

It could be something like this?:

<property as="xs:integer"       name="oxf.fr.format.input.number" value="true"
validation="matches(.,'^(\d{9}|\d{3}\s\d{2}\s\d{2}\s\d{2})"/>?

It would be possible or we can only do the validation by adding a formula in
the control options?

Hope you can answer soon, thanks.
Iñigo.

--
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 post to this group, send email to [hidden email].

--
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 post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet