validationErrors: function()

in src/plugins/coding.ts [746:775]


    validationErrors: function (objectType: ObjectSpec.Type): Error.Error[] {
      const unknownTypeErrors = objectType.attributes
        .filter(doesValueAttributeContainAnUnknownType)
        .map((attribute) =>
          valueAttributeToUnknownTypeError(objectType, attribute),
        );
      const unsupportedTypeErrors = objectType.attributes
        .filter(doesValueAttributeContainAnUnsupportedType)
        .map((attribute) =>
          valueAttributeToUnsupportedTypeError(objectType, attribute),
        );
      const unsupportedLegacyKeyTypeErrors = objectType.attributes
        .filter(doesValueAttributeContainAnLegacyKeyForUnsupportedType)
        .map((attribute) =>
          valueAttributeToUnsupportedLegacyKeyTypeError(objectType, attribute),
        );
      const multipleCodingKeyErrors = Maybe.catMaybes(
        objectType.attributes.map((attribute) =>
          multipleCodingKeyAnnotationErrorForValueAttribute(
            objectType,
            attribute,
          ),
        ),
      );
      return unknownTypeErrors.concat(
        unsupportedTypeErrors,
        unsupportedLegacyKeyTypeErrors,
        multipleCodingKeyErrors,
      );
    },