added some validation rules.