[Erp5-dev] Validating W3 Confomance of ERP5 Forms

Jacek Medrzycki jacek at erp5.pl
Thu Mar 29 10:13:19 CEST 2007


Pelletier Vincent napisał(a):
> Le Lundi 26 Mars 2007 17:10, Jacek Medrzycki a écrit :
>   
>> I have written a small test that validates forms using external
>> validator on w3.org page.
>>     
>
> It would be better to use a local validation mean. Yoshinori suggested, for 
> example, http://openjade.sourceforge.net/ .
>   
I'll have a look. BTW, I think that w3org validator can also be 
installed lokally, why not use it?
> eval is evil :)
>
> Instead of
>   eval('object.%s' % (some_id, ))
> please use
>   getattr(object, some_id)
>   
I know that eval could be a security threat, especially when dealing 
with user input, but I thought it is safe in unit test. But I'll fix the 
code of course.

>
> I also think verbosity should be given to this class' constructor in order to 
> factorise the "append" code.
>   
Can you explain more closely. I don't understand fully what you mean.

Jacek



More information about the Erp5-dev mailing list