database adjust before save

add more validations