Added some validation rules.