I am very much interested in your project. Can you send some screenshots?

Anyway, the problem is that you are probably piping your validator to the 
normal one. Can I see your validator and how it is applied?

On Friday, 5 April 2013 06:23:39 UTC-5, demetrio wrote:
>
> Hi everyone, 
>
> I have noticed that i cannot use 2 or more datetime validators on the 
> same field. 
>
> I'm building a SCRUM project management app. Making the sprints module I 
> need to validate that a new sprint is inside the project date range, and 
> at the same time, the sprint doesn't overlaps with other sprints. 
> So I was using IS_DATETIME_IN_RANGE to check that the date is inside of 
> the project date range, and made a copy called IS_NOT_DATETIME_IN_RANGE 
> that I apply at execution time to check that the new sprint is not 
> inside the range of other sprints. 
>
> Trying to do this, I get this error: 
>
>   File "applications/openmywork/modules/omw/core/model/tableinterface.py", 
> line 118, in form 
>     return SQLFORM(self.table, record=row_id, _id=form_id) 
>   File "/home/demetrio/devel/web2py_2.3.2/gluon/sqlhtml.py", line 1036, in 
> __init__ 
>     default = field.formatter(default) 
>   File "/home/demetrio/devel/web2py_2.3.2/gluon/dal.py", line 8723, in 
> formatter 
>     value = item.formatter(value) 
>   File "/home/demetrio/devel/web2py_2.3.2/gluon/validators.py", line 2243, 
> in formatter 
>     year = value.year 
> AttributeError: 'str' object has no attribute 'year' 
>
>
>
> It seems that the first time that a date validato is executed, it 
> formats to str, so in the second validator, it cannot recognice it. 
>
> Is there any way to make this validation using web2py validators at 
> execution time? 
>
> thanks in advance. 
> Daniel 
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to