Generate validation rules