adding validations to db actions