示例#1
0
// ValidateUpdate is the default update validation for an end user.
func (strategy) ValidateUpdate(ctx api.Context, obj, old runtime.Object) field.ErrorList {
	newObj := obj.(*rbac.Role)
	errorList := validation.ValidateRole(newObj)
	return append(errorList, validation.ValidateRoleUpdate(newObj, old.(*rbac.Role))...)
}
示例#2
0
// Validate validates a new Role. Validation must check for a correct signature.
func (strategy) Validate(ctx api.Context, obj runtime.Object) field.ErrorList {
	role := obj.(*rbac.Role)
	return validation.ValidateRole(role)
}