{"record":{"id":"ec8058d7f5479ed7","repo":"kubernetes/kops","slug":"field-is-required-s","errorCode":null,"errorMessage":"Field is required: %s","messagePattern":"Field is required: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/errors.go","lineNumber":29,"sourceCode":"distributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\npackage fi\n\nimport (\n\t\"fmt\"\n\n\t\"k8s.io/apimachinery/pkg/api/validation\"\n\t\"k8s.io/apimachinery/pkg/util/validation/field\"\n\n\t\"k8s.io/kops/util/pkg/reflectutils\"\n)\n\nfunc RequiredField(key string) error {\n\treturn fmt.Errorf(\"Field is required: %s\", key)\n}\n\nfunc CannotChangeField(key string) error {\n\treturn fmt.Errorf(\"Field cannot be changed: %s\", key)\n}\n\nfunc FieldIsImmutable(newVal, oldVal interface{}, fldPath *field.Path) *field.Error {\n\tdetails := fmt.Sprintf(\"%s: old=%v new=%v\", validation.FieldImmutableErrorMsg, reflectutils.FormatValue(oldVal), reflectutils.FormatValue(newVal))\n\treturn field.Forbidden(fldPath, details)\n}\n","sourceCodeStart":11,"sourceCodeEnd":40,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/errors.go#L11-L40","documentation":"Error \"Field is required: %s\" thrown in kubernetes/kops.","triggerScenarios":"Thrown at upup/pkg/fi/errors.go:29 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T07:17:12.445Z"}