update error info with the new limit in #98753

This commit is contained in:
CKchen0726 2021-06-03 11:08:09 +08:00
parent 2cefcc6be7
commit 918246d7a1

View File

@ -351,7 +351,7 @@ func validateCSINodeDriverNodeID(nodeID string, fldPath *field.Path, validationO
maxLength = csiNodeIDLongerMaxLength maxLength = csiNodeIDLongerMaxLength
} }
if len(nodeID) > maxLength { if len(nodeID) > maxLength {
allErrs = append(allErrs, field.Invalid(fldPath, nodeID, fmt.Sprintf("must be %d characters or less", csiNodeIDMaxLength))) allErrs = append(allErrs, field.Invalid(fldPath, nodeID, fmt.Sprintf("must be %d characters or less", maxLength)))
} }
return allErrs return allErrs
} }