validations for db.rb