J
Joe Bloggs
Hi,
can someone kindly suggest a regular expression that I can use with Struts
validator?
I have a regular expression like this:
validation.xml
=============
[snip]
<constant>
<constant-name>url</constant-name>
<constant-value>^(http:\/\/)?([\w-]+\.)+[\w-]+(/[\w-
../]*)?</constant-value>
</constant>
[snip]
but when Struts generates the javascript using this mask, it complains about
some "Object required" error. I have isolated it down to the culprit
(http:\/\/)?
it seems that the javascript generated does not treat // characters kindly.
If I remove this bit, the regular expression works.
So am I forced to only check for an URL string without the "http:// "
prefix?
Thanks
can someone kindly suggest a regular expression that I can use with Struts
validator?
I have a regular expression like this:
validation.xml
=============
[snip]
<constant>
<constant-name>url</constant-name>
<constant-value>^(http:\/\/)?([\w-]+\.)+[\w-]+(/[\w-
../]*)?</constant-value>
</constant>
[snip]
but when Struts generates the javascript using this mask, it complains about
some "Object required" error. I have isolated it down to the culprit
(http:\/\/)?
it seems that the javascript generated does not treat // characters kindly.
If I remove this bit, the regular expression works.
So am I forced to only check for an URL string without the "http:// "
prefix?
Thanks