modified validations to candidate model and added unit tests to candidate model