Hi,

I am using on validation to check for text strings in a form . Is there a 
way i stop the database insert happening if the strings are matched ? so 
far i am only able to remove the words.

Thanks

def check(form):
    
    check = ["this word", "or this word"]

    for x in check:
        if x.upper() in form.vars.body.upper():
            response.flash = T("Content Not Allowed")
            form.vars.body=''



-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to