Your regex only allows for 1 character after ogc_fid. I'd rewrite as:
'^ogc_fid=[0-9]{1,5}$'
This restricts the number a bit more, plus doesn't allow characters before or
after. Really you could to:
VALIDATION
'ogc_fid' '^[0-9]{1-5}$'
END
FILTER "ogc_fid=%ogc_fid%"
That's a lot cleaner.
Steve
-----Original Message-----
From: Richard Greenwood [mailto:[email protected]]
Sent: Tuesday, June 12, 2012 9:35 AM
To: Lime, Steve D (DNR)
Cc: mapserver
Subject: Re: [mapserver-users] Regular expression error
If I don't have any key/value in the query string I get a whole bunch regular
expression errors in the error log. In other words, just the presence of that
layer in the map file is generating error. An actual value would look like
ogr_fid=123456
Thanks,
Rich
On Tue, Jun 12, 2012 at 8:29 AM, Lime, Steve D (DNR) <[email protected]>
wrote:
> What value are you trying to validate?
>
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Richard
> Greenwood
> Sent: Tuesday, June 12, 2012 9:26 AM
> To: mapserver
> Subject: [mapserver-users] Regular expression error
>
> I am getting the error:
> msValidateParameter(): Regular expression error. Parameter pattern
> validation failed.
>
> From the following in my LAYER definition:
> METADATA
> 'filter_validation_pattern' 'ogc_fid.'
> END
> FILTER "%filter%"
>
> And I just can't see what I'm doing wrong. I'd sure appreciate another set of
> eyes...
>
> Thanks,
> Rich
>
> --
> Richard Greenwood
> [email protected]
> www.greenwoodmap.com
> _______________________________________________
> mapserver-users mailing list
> [email protected]
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
--
Richard Greenwood
[email protected]
www.greenwoodmap.com
_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users