Hi,
You may want to try a quick fix (not sure that's ok, but it seems to
work):
# file validators.py
# line 1306
try:
subMethod = eval('IS_' + str(self.mode).upper()
+ '_URL
(allowed_schemes=self.allowed_schemes,
prepend_scheme=self.prepend_scheme,error_message="' +
self.error_message + '")'
imho it's not a bug, it's just IS_HTTP_URL error_message attribute,
which is returned from IS_URL, and it has value "invalid url!".
On Apr 5, 10:50 am, ab <[email protected]> wrote:
> Hi
>
> I have problem with custom message on url field validation. I set
> following rule in db.py
>
> db.mytable.url.requires=IS_URL(error_message='Must be URL')
>
> but validation always returns 'invalid url!' message . Custom
> validation message working fine for other validators, like
> IS_NOT_EMPTY or IS_DATE, I have problem only with IS_URL. I'm using
> web2py 1.59
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---