Hi

sorry

I didn't notice that I was trying to add the validation after defining
the form

But for other problems, let me be clear about them

1 - I want to have the error message be translated, in case of
IS_INT_IN_RANGE(v1, v2, error_message=...........)
     So I did the following

    error = T("enter a value between %(min)s and %(max)s",dict(min=v1,
max=v2+1))
    db.table.field.requires = IS_INT_IN_RANGE(v1, v2,
error_message=error)

   trying to print error, it's working though but I can't add the
error message in the validator, so How can I add them ?
   db.table.field.requires = IS_INT_IN_RANGE(v1, v2, error_message=T
("enter a value between %(min)s and %(max)s",dict(min=v1, max=v2+1)))

2 - The most important thing that I want a solution for it is that :

      Imagine this scenario : I have a form that contains a field for
a user name
      and I've another field which values I need to add a validator
on , so that it gets the value entered (in the user field) and query
the database to check whether this user is allowed
      to add those values or not

     something like : I need to get a value from a field and based on
it I make a check

Thanks
-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.


Reply via email to