python - How to set multiple validators to a field in web2py? -



python - How to set multiple validators to a field in web2py? -

i wanna set multiple validators filed sample. 1 of them work well. why?

db.aetitles.hospital_id.requires = is_not_empty() db.aetitles.hospital_id.requires = is_in_db(db, db.hospitals.id, '%(title)s')

i tried , right:

db.aetitles.hospital_id.requires = [is_not_empty(), is_in_db(db, db.hospitals.id, '%(title)s')]

python web2py

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -