Added constraints on values in photos and text db
refs #542