commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Cagle" <>
Subject [validator] Problem with regular expression for mask validator
Date Wed, 09 Aug 2006 16:06:43 GMT
Hi everyone!

I'm trying to use the mask validator for a field but running into a JavaScript error when
the code is ran.  Here is a snippet from my validation.xml:

<form name="gotoPageForm">
  <field property="selectedTopic" depends="required,mask">
     <msg name="required" key="errors.goto.text.required.txt"/>
     <msg name="mask" key="errors.goto.maskmsg.txt"/>

And here is the JavaScript error:

Error: syntax error
Source file: http://localhost:8080/SASDoc/oldoc/ui/gotoPageDialog
Line: 132, Column: 14
Source code:
this.mask=/^/[^/]+\.hlp/[^#]+(?:#.+)?$/;  return this[varName];

There is a little arrow in the error console pointing to the 2nd '^' inside of the brackets
[].  I'm assuming that I can't have another '^' in the regular expression or something.

I'm trying to make sure the field has a format of '/something.hlp/topic.htm' or '/something.hlp/topic.pdf'...something
along those lines.

Any ideas?  Any help would be greatly appreciated, thanks!

David Cagle
Applications Developer
Publications Technology Development
(919) 531-4814
SAS ... The Power to Know

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message