Hi Thomas,
Thx for reply, I don't know this sintax.
I try this:
theLayer = clone_map.getLayer(li)
tempValidation = "VALIDATION 'idtpn' '^[a-zA-Z0-9\-_#]+$'
'default_idtpn' '%' END"
theLayer.updatefromstring(tempValidation)
But it return an error:
Traceback (most recent call last):
File "generatore_mapfile_istat.py", line 192, in <module>
theLayer.updatefromstring(tempValidation)
File "C:\my-programs\osgeo4w\apps\Python27\lib\site-packages\mapscript.py", li
ne 1385, in <lambda>
__getattr__ = lambda self, name: _swig_getattr(self, layerObj, name)
File "C:\my-programs\osgeo4w\apps\Python27\lib\site-packages\mapscript.py", li
ne 54, in _swig_getattr
raise AttributeError(name)
AttributeError: updatefromstring
A.
2016-01-14 10:38 GMT+01:00 thomas bonfort <[email protected]>:
> if there is no mapscript interface for VALIDATION you can always use
>
> layer->updatefromstring("VALIDATION etc END")
>
> --
> thomas
>
> On 14 January 2016 at 10:33, Andrea Peri <[email protected]> wrote:
>>
>> Hi,
>>
>> Is possible , using the python mapscript add a block for validation like
>> this ?
>>
>> VALIDATION
>> 'idtpn' '^[a-zA-Z0-9\-_#]+$'
>> 'default_idtpn' '%'
>> END
>>
>>
>> --
>> -----------------
>> Andrea Peri
>> . . . . . . . . .
>> qwerty àèìòù
>> -----------------
>> _______________________________________________
>> mapserver-users mailing list
>> [email protected]
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
--
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------
_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users