Posted by
Alessandro Vernet on
Jan 05, 2010; 3:44am
URL: https://discuss.orbeon.com/Using-matches-in-a-bind-tp998580p998824.html
Stephanie,
There is a closing parenthesis missing at the end of the XPath
expression. Adding it, with the small example I created here, I can
see the field being marked as invalid, as expected. If the problem is
not with the closing parenthesis, could you post a full (but simple)
example that runs in the XForms sandbox and reproduces this?
Alex
On Monday, January 4, 2010, Stephanie Hall (TT)
<
[hidden email]> wrote:
>
>
>
>
>
>
>
>
>
>
>
>
>
> Hi all,
>
>
>
> I am hoping someone can point out what I am doing wrong
> here. I have a few instances in my page, and on submit, I want to make
> sure that there are no invalid characters in the name node of one of the
> instances. However, if I enter “ef@#*$(#$“ the form will submit
> when it should not.
>
>
>
> This is what I have currently:
>
>
>
> <xforms:bind nodeset="instance('my-instance')/name"
> constraint="matches(instance('my-instance')/name,'^[0-9A-Za-z]+[0-9A-Za-z
> \._-]*$'" type="xs:string"/>
>
>
>
> I’ve
> tested the regex by using a regexp validator so I don’t think that is the
> problem. The instance node is only bound to a simple input, I just only want
> to accept non-special characters (aside from period, hyphen, underscore and
> space).
>
>
>
> Any
> help is very much appreciated!
>
> Thanks,
>
> Stephanie
>
>
>
>
>
>
>
>
>
--
Orbeon Forms - Web forms, open-source, for the Enterprise
Orbeon's Blog:
http://www.orbeon.com/blog/My Twitter:
http://twitter.com/avernet--
You receive this message as a subscriber of the
[hidden email] mailing list.
To unsubscribe: mailto:
[hidden email]
For general help: mailto:
[hidden email]?subject=help
OW2 mailing lists service home page:
http://www.ow2.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet