Adding validation to models