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

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

How do you set up a perforce server to work over the internet? -

ios - Lagging ScrollView with UIWebview inside -