I could figure out :)












*import osclass IS_PATH(object):    def __init__(self, error_message='use a
valid unix path'):        self.error_message = error_message    def
__call__(self, value):        try:            if not
os.path.isabs(value):                raise Exception("Invalid
Path")            else:                return (value, None)
except:            return (value, self.error_message)*


On Wed, Dec 31, 2014 at 6:45 PM, Tito Garrido <[email protected]> wrote:

> Hi Folks!
>
> Anybody has built a custom validator for unix paths? I need to validate if
> a path is valid even if the directory/file doesn't exist.
>
> Thanks!
>
> Tito
>
> --
>
> Linux User #387870
> .........____
> .... _/_õ|__|
> ..º[ .-.___.-._| . . . .
> .__( o)__( o).:_______
>



-- 

Linux User #387870
.........____
.... _/_õ|__|
..º[ .-.___.-._| . . . .
.__( o)__( o).:_______

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to