validates model