[Xsltforms-support] Validation with regex?
Brought to you by:
alain-couthures
From: Elias M. <eli...@gm...> - 2013-05-09 17:57:32
|
Hi. I'm trying to validate a field that holds a file name to be stored in exist-db. I want to ensure only characters, numbers, space and . , _ - characters are allowed. I know I can use not(contains()) like this: <xf:bind nodeset="instance('local')/FileName" type="xsd:string" required="true()" constraint="not(contains(.,'!')) and not(contains(.,'$'))"/> but that means doing for every character not allowed. Is there a better way, like a regexp match? Thanks. Elias |