adding validations to affiliates.rb