code: func ValidateReplicaSet(rs *apps.ReplicaSet) field.ErrorList {
  	allErrs := apivalidation.ValidateObjectMeta(&rs.ObjectMeta, true, ValidateReplicaSetName, field.NewPath("metadata"))
  	allErrs = append(allErrs, ValidateReplicaSetSpec(&rs.Spec, field.NewPath("spec"))...)
  	return allErrs
  }
docs: // ValidateReplicaSet tests if required fields in the ReplicaSet are set.