added validates to pin model