Added validations to pin model