@vannizhang/living-atlas-content-validator
v1.5.24
Published
Validation and Scoring rules for curating content in the ArcGIS Living Atlas
Readme
ArcGIS Living Atlas Content Validator
This package provides a comprehensive set of validation and scoring rules designed to assist in the curation of content for the ArcGIS Living Atlas. It plays a crucial role in ensuring that nominated items meet the high-quality standards required for inclusion in the Living Atlas of the World. The package is utilized in two key applications:
- Living Atlas Nomination App – Enables item owners to validate their own content before submitting it for nomination.
- Living Atlas Curation App – Used by Living Atlas Curators to perform a detailed evaluation of nominated items.
The validation process evaluates whether an item meets all necessary criteria, such as metadata completeness and adherence to best practices. By enforcing these validation and scoring rules, the package helps to ensure that only high-quality, well-documented, and properly formatted content is nominated and included in the ArcGIS Living Atlas of the World.
Table of Contents
- Installation
- Usage
- Configuration
- API Reference - Core Functions
- validate
- isValidTitle
- isValidAccessInformation
- isValidDescription
- isValidLicenseInfo
- isValidAccess
- isValidSummary
- isValidTags
- isValidThumbnail
- isDeprecated
- isDeleteProtectionEnabled
- isValidUserProfileName
- isValidUserProfileDescription
- isValidUserProfileThumbnail
- checkFeatureServiceFieldAliases
- checkFeatureServiceFieldDescriptions
- checkFeatureServiceFieldValueTypes
- checkFeatureServiceCDNSetting
- checkFeatureServiceExportSetting
- checkTitleAndSnippetSearchability
- checkItemExtent
- API Reference - Helper Functions
- isEligibleForCheckingTitleAndSnippetSearchability
- matchLocationInfo
- isRecognizedLocation
- isRejectedLocationInfo
- matchSourceInfo
- isRecognizedSource
- isRejectedSourceInfo
- matchTopicInfo
- isRecognizedTopic
- isRejectedTopicInfo
- matchDateTimeInfo
- isRecognizedDateTimeInfo
- isRejectedDateTimeInfo
- getLivingAtlasSupportedItemTypes
- checkIsLivingAtlasSupportedItemType
- Types
- Weight based scoring
- Issues
- License
Installation
Install the package using npm:
npm install @vannizhang/living-atlas-content-validatorUsage
Import and use the validator in your project:
import {
validate,
} from '@vannizhang/living-atlas-content-validator';
// ArcGIS Online Item to validate
const item = {
id: 'mock-item-id',
owner: 'mock-owner',
title: 'Mock Item Title',
snippet: 'This is a short summary of the item.',
description: 'This is a detailed description of the item.',
type: 'Web Map',
tags: ['tag1', 'tag2'],
// Other properties...
}
// User profile of the owner of the item being validated.
const userProfile = {
fullName: 'mock-owner',
description: 'mocked user profile',
thumbnail: 'thumbnail/avatar.png',
// Other properties...
}
const validationResults = validate(item, userProfile);Configuration
The package provides a configureSettings function that allows customization of language, additional validation patterns and etc.
configureSettings(params)
Configures the package settings including language preferences, additional matching patterns to be used for title and snippet searchability rule and etc. This function should be called before using any validation functionality to ensure the validator operates with the correct context and rule set.
Parameters:
additionalPatternsForTitleAndSnippetSearchability(object, optional) - Additional validation patterns for title and snippet searchability. These additional patterns are global, will be used for all items validated by the package. If you want to use custom patterns for a specific item, you can pass them as options to thevalidatefunction.matchingPatternsLocation(string[]) - List of location matching patterns.rejectedPatternsLocation(string[]) - List of rejected location patterns.matchingPatternsSource(string[]) - List of source matching patterns.rejectedPatternsSource(string[]) - List of rejected source patterns.matchingPatternsTopic(string[]) - List of topic matching patterns.rejectedPatternsTopic(string[]) - List of rejected topic patterns.matchingPatternsYearVintage(string[]) - List of matching year vintage patterns.rejectedPatternsYearVintage(string[]) - List of rejected year vintage patterns.shouldAvoidUsingWordBoundary(boolean) - Determines if word boundaries should be avoided (for non-Latin languages).
language(string, optional) - This setting determines the language used for displaying messages of the validation results. Default is'en'. Supported languages:'en'(English)'de'(German)'es'(Spanish)'fr'(French)'ja'(Japanese)'pt-br'(Brazilian Portuguese)
profanities(string[], optional) - List of words considered profane for validation.serviceTier(string, option) - The service tier of the application. Some helper modules (not part of the core evaluation logic) depend on this setting. If you're only using the library to evaluate content, you can safely ignore this.'dev': Development tier, points todevext.arcgis.com.'prod': Production tier, points towww.arcgis.com.
When should I use configureSettings?
You should use configureSettings if you want to define additional matching patterns for title and snippet searchability, especially in cases where the default patterns may not account for all special scenarios. This is particularly helpful for non-English languages or specialized domains with frequently used terms.
The Living Atlas team also uses the configureSettings function to incorporate matching patterns suggested by users of the Living Atlas Nomination App.
Example Usage of configureSettings
import {
configureSettings
} from '@vannizhang/living-atlas-content-validator';
configureSettings({
additionalPatternsForTitleAndSnippetSearchability: {
matchingPatternsLocation: ['New York', 'Los Angeles'],
rejectedPatternsLocation: ['Unknown', 'Unknown Location'],
matchingPatternsSource: ['NOAA', 'Department of Energy'],
rejectedPatternsSource: ['Unknown', 'Unknown Source'],
matchingPatternsTopic: ['Climate Change', 'Renewable Energy'],
rejectedPatternsTopic: ['Unknown', 'Unknown Topic'],
matchingPatternsYearVintage: ['bi-weekly', 'monthly'],
rejectedPatternsYearVintage: ['Unknown', 'Unknown Year Vintage'],
shouldAvoidUsingWordBoundary: false
},
language: 'en',
profanities: ['badword1', 'badword2'],
serviceTier: 'prod',
});API Reference - Core Functions
These are the core functions provided by the package for validating ArcGIS Online items against Living Atlas criteria. The validate function serves as the main entry point, performing comprehensive validation by internally invoking the other functions. Each of these functions can also be used independently for targeted validation tasks.
validate
Validates an ArcGIS Online item and its owner's user profile against Living Atlas criteria.
import { validate } from '@vannizhang/living-atlas-content-validator';
validate(
item: IItem,
userProfile: IUser,
options?: ValidateOptions
): ValidationResultParameters:
item(IItem, required): The ArcGIS Online item to validate.userProfile(IUser, required): The user profile of the item's owner.options(ValidateOptions, optional): Additional configuration for validation.customPatternsForLocationInfo(string[], optional): Custom patterns for identifying location information in the item's title and snippet.customPatternsForDataVintageInfo(string[], optional): Custom patterns for identifying data vintage (date/time) information in the item's title and snippet.customPatternsForSourceInfo(string[], optional): Custom patterns for identifying source information in the item's title and snippet.customPatternsForTopicInfo(string[], optional): Custom patterns for identifying topic information in the item's title and snippet.thumbnailDimension({ width: number; height: number; }, optional): The dimensions (in pixels) of the item's largest thumbnail image, used for validating thumbnail requirements.featureLayers(FeatureLayerJSON[], optional): An array ofFeature Layer JSONobjects representing the feature layers associated with the Feature Service item. Used for validating field value types, aliases, and descriptions within those layers.featureServiceAdminJSON(FeatureServiceAdminJSON, optional): TheFeature Service Admin JSONobject representing the Feature Service item's administrative settings. Used for checking the advisories of the Feature Service.
Returns:
ValidationResult: An object containing detailed validation results, a total score, and a flag indicating whether the item can be nominated to Living Atlas.
Example: Validating an Item Using Custom Matching Patterns
import { validate } from '@vannizhang/living-atlas-content-validator';
// An ArcGIS Online item to validate
const item = {
id: 'mock-item-id',
owner: 'mock-owner',
title: 'Mock Item Title',
snippet: 'This is a short summary of the item.',
description: 'This is a detailed description of the item.',
type: 'Web Map',
tags: ['tag1', 'tag2'],
// Other properties...
};
// User profile of the owner of the item being validated
const userProfile = {
fullName: 'mock-owner',
description: 'mocked user profile',
thumbnail: 'thumbnail/avatar.png',
culture: 'en',
// Other properties...
};
// Custom options for validate function that include custom patterns for location, data vintage, source, and topic information
const options = {
customPatternsForLocationInfo: ['New York','Los Angeles'],
customPatternsForDataVintageInfo: ['bi-weekly'],
customPatternsForSourceInfo: ['NOAA'],
customPatternsForTopicInfo: [ 'Climate Change' ],
thumbnailDimension: { width: 600, height: 400 },
};
// Validate the item and user profile with options
const validationResults = validate(item, userProfile, options);
console.log(validationResults);Example: Validating a Feature Service Item with Feature Layers
import { validate } from '@vannizhang/living-atlas-content-validator';
// An ArcGIS Online Feature Service item to validate
const item = {
id: 'mock-feature-service-id',
owner: 'mock-owner',
title: 'US County Boundaries',
snippet: 'County boundaries for the United States.',
description: 'This feature service provides detailed county boundaries for the United States, including FIPS codes and population estimates.',
type: 'Feature Service',
tags: ['boundaries', 'counties', 'USA'],
access: 'public',
// Other properties...
};
// User profile of the owner of the item being validated
const userProfile = {
fullName: 'mock-owner',
description: 'GIS data publisher for US boundaries.',
thumbnail: 'thumbnail/avatar.png',
culture: 'en',
// Other properties...
};
// Custom options for validate function that include feature layers associated with the Feature Service item
const options = {
// feature layers associated with the Feature Service item
featureLayers: [
{
id: 0,
name: 'Counties',
type: 'Feature Layer',
description: 'US county boundaries.',
copyrightText: 'U.S. Census Bureau',
supportsRollbackOnFailures: true,
geometryType: 'esriGeometryPolygon',
fields: [
{ name: 'NAME', alias: 'County Name', description: { value: 'The name of the county', fieldValueType: 'nameOrTitle' } },
{ name: 'FIPS', alias: 'FIPS Code', description: { value: 'Federal Information Processing Standard code', fieldValueType: 'uniqueIdentifier' } },
{ name: 'POP_EST', alias: 'Population Estimate', description: { value: 'Estimated population', fieldValueType: 'countOrAmount' } }
]
}
],
// Feature Service Admin JSON object
featureServiceAdminJSON: {
adminServiceInfo: {
"name": "US County Boundaries",
"type": "FeatureServer",
"cacheMaxAge": 3600,
},
// Other properties...
},
thumbnailDimension: { width: 600, height: 400 },
};
const validationResults = validate(item, userProfile, options);
console.log(validationResults);isValidTitle
Validates an item's title against ArcGIS Online and Living Atlas-specific rules.
import { isValidTitle } from '@vannizhang/living-atlas-content-validator';
isValidTitle(
item: IItem,
prohibitedList?: string[]
): ValidationInfoParameters:
item(IItem, required): The ArcGIS Online item whose title needs validation.prohibitedList(string[], optional): A list of prohibited words or strings. Defaults toPROHIBITED_LIST.
Returns:
ValidationInfo: An object containing the validation results for the title.
Example:
import { isValidTitle } from '@vannizhang/living-atlas-content-validator';
const item = {
title: 'Mock Item Title',
culture: 'en',
// Other properties...
};
const prohibitedList = ['test', 'demo', 'eval'];
const validationInfo = isValidTitle(item, prohibitedList);
console.log(validationInfo);isValidAccessInformation
Validates an item's "Credits (Attribution)" field, which provides information on the source of the item and its copyright status.
import { isValidAccessInformation } from '@vannizhang/living-atlas-content-validator';
isValidAccessInformation(
item: IItem
): ValidationInfoParameters:
item(IItem, required): The ArcGIS Online item whose "Credits (Attribution)" field needs validation.
Returns:
ValidationInfo: An object containing the validation results for the "Credits (Attribution)" field.
Example:
import { isValidAccessInformation } from '@vannizhang/living-atlas-content-validator';
const item = {
accessInformation: 'National Oceanic and Atmospheric Administration (NOAA)',
// Other properties...
};
const validationInfo = isValidAccessInformation(item);
console.log(validationInfo);isValidDescription
Validates an item's description field.
import { isValidDescription } from '@vannizhang/living-atlas-content-validator';
isValidDescription(
item: IItem
): ValidationInfoParameters:
item(IItem, required): The ArcGIS Online item whose description field needs validation.
Returns:
ValidationInfo: An object containing the validation results for the description field.
Example:
import { isValidDescription } from '@vannizhang/living-atlas-content-validator';
const item = {
description: 'This is a detailed description of the item. It provides comprehensive information about the data, its sources, and how to use it effectively.',
// Other properties...
};
const validationInfo = isValidDescription(item);
console.log(validationInfo);isValidLicenseInfo
Validates an item's "Terms of Use (license info)" field.
import { isValidLicenseInfo } from '@vannizhang/living-atlas-content-validator';
isValidLicenseInfo(
item: IItem
): ValidationInfoParameters:
item(IItem, required): The ArcGIS Online item whose "Terms of Use (license info)" field needs validation.
Returns:
ValidationInfo: An object containing the validation results for the "Terms of Use (license info)" field.
Example:
import { isValidLicenseInfo } from '@vannizhang/living-atlas-content-validator';
const item = {
licenseInfo: 'This data is licensed under the Open Data Commons Open Database License (ODbL). For more information, visit <a href="https://opendatacommons.org/licenses/odbl/">ODbL License</a>.',
// Other properties...
};
const validationInfo = isValidLicenseInfo(item);
console.log(validationInfo);isValidAccess
Validates an item's sharing level to ensure it meets Living Atlas requirements.
import { isValidAccess } from '@vannizhang/living-atlas-content-validator';
isValidAccess(
item: IItem
): ValidationInfoParameters:
item(IItem, required): The ArcGIS Online item whose sharing level needs validation.
Returns:
ValidationInfo: An object containing the validation results for the sharing level.
Example:
import { isValidAccess } from '@vannizhang/living-atlas-content-validator';
const item = {
access: 'public', // Sharing level of the item
// Other properties...
};
const validationInfo = isValidAccess(item);
console.log(validationInfo);isValidSummary
Validates an item's summary (snippet) field.
import { isValidSummary } from '@vannizhang/living-atlas-content-validator';
isValidSummary(
item: IItem,
prohibitedList?: string[]
): ValidationInfoParameters:
item(IItem, required): The ArcGIS Online item whose summary (snippet) field needs validation.prohibitedList(string[], optional): A list of prohibited words or strings. Defaults toPROHIBITED_LIST.
Returns:
ValidationInfo: An object containing the validation results for the summary field.
Example:
import { isValidSummary } from '@vannizhang/living-atlas-content-validator';
const item = {
snippet: 'This is a brief summary of the item, providing key details and context for users.',
culture: 'en',
// Other properties...
};
const prohibitedList = ['test', 'demo', 'eval'];
const validationInfo = isValidSummary(item, prohibitedList);
console.log(validationInfo);isValidTags
Validates an item's tags to ensure they meet ArcGIS Online and Living Atlas-specific rules.
import { isValidTags } from '@vannizhang/living-atlas-content-validator';
isValidTags(
item: IItem,
prohibitedList?: string[]
): ValidationInfoParameters:
item(IItem, required): The ArcGIS Online item whose tags need validation.prohibitedList(string[], optional): A list of prohibited tags. Defaults toPROHIBITED_LIST.
Returns:
ValidationInfo: An object containing the validation results for the tags.
Example:
import { isValidTags } from '@vannizhang/living-atlas-content-validator';
const item = {
tags: ['climate', 'renewable energy', 'NOAA'],
// Other properties...
};
const prohibitedList = ['test', 'demo', 'eval'];
const validationInfo = isValidTags(item, prohibitedList);
console.log(validationInfo);isValidThumbnail
Validates an item's thumbnail to ensure it meets Living Atlas-specific rules.
import { isValidThumbnail } from '@vannizhang/living-atlas-content-validator';
isValidThumbnail(
item: IItem,
thumbnailDimension?: { width: number; height: number }
): ValidationInfoParameters:
item(IItem, required): The ArcGIS Online item whose thumbnail needs validation.thumbnailDimension({ width: number; height: number }, optional): The dimensions of the item's thumbnail.
Returns:
ValidationInfo: An object containing the validation results for the thumbnail.
Example:
import { isValidThumbnail } from '@vannizhang/living-atlas-content-validator';
const item = {
thumbnail: 'custom-thumbnail.png',
// Other properties...
};
const thumbnailDimension = { width: 610, height: 405 };
const validationInfo = isValidThumbnail(item, thumbnailDimension);
console.log(validationInfo);isDeprecated
Validates an item's contentStatus to ensure it is not marked as deprecated.
import { isDeprecated } from '@vannizhang/living-atlas-content-validator';
isDeprecated(
item: IItem
): ValidationInfoParameters:
item(IItem, required): The ArcGIS Online item whosecontentStatusneeds validation.
Returns:
ValidationInfo: An object containing the validation results for thecontentStatus.
Example:
import { isDeprecated } from '@vannizhang/living-atlas-content-validator';
const item = {
contentStatus: 'deprecated', // Content status of the item
// Other properties...
};
const validationInfo = isDeprecated(item);
console.log(validationInfo);isDeleteProtectionEnabled
Validates an item's protected property to ensure Delete Protection is enabled.
import { isDeleteProtectionEnabled } from '@vannizhang/living-atlas-content-validator';
isDeleteProtectionEnabled(
item: IItem
): ValidationInfoParameters:
item(IItem, required): The ArcGIS Online item whoseprotectedproperty needs validation.
Returns:
ValidationInfo: An object containing the validation results for theprotectedproperty.
Remark:
- The delete protection status is only exposed to the item owner.
Example:
import { isDeleteProtectionEnabled } from '@vannizhang/living-atlas-content-validator';
const item = {
protected: true, // Indicates whether Delete Protection is enabled
// Other properties...
};
const validationInfo = isDeleteProtectionEnabled(item);
console.log(validationInfo);isValidUserProfileName
Validates an item owner's profile name to ensure it meets Living Atlas-specific rules.
import { isValidUserProfileName } from '@vannizhang/living-atlas-content-validator';
isValidUserProfileName(
userProfile: IUser
): ValidationInfoParameters:
userProfile(IUser, required): The user profile of the item's owner.
Returns:
ValidationInfo: An object containing the validation results for the user profile name.
Example:
import { isValidUserProfileName } from '@vannizhang/living-atlas-content-validator';
const userProfile = {
fullName: 'John_Doe',
culture: 'en',
// Other properties...
};
const validationInfo = isValidUserProfileName(userProfile);
console.log(validationInfo);isValidUserProfileDescription
Validates an item owner's profile description to ensure it meets Living Atlas-specific rules.
import { isValidUserProfileDescription } from '@vannizhang/living-atlas-content-validator';
isValidUserProfileDescription(
userProfile: IUser
): ValidationInfoParameters:
userProfile(IUser, required): The user profile of the item's owner.
Returns:
ValidationInfo: An object containing the validation results for the user profile description.
Example:
import { isValidUserProfileDescription } from '@vannizhang/living-atlas-content-validator';
const userProfile = {
description: 'I am a GIS professional with expertise in mapping and spatial analysis. Contact me at [email protected]. Visit my portfolio at https://johndoe.com.',
culture: 'en',
// Other properties...
};
const validationInfo = isValidUserProfileDescription(userProfile);
console.log(validationInfo);isValidUserProfileThumbnail
Validates a user's profile thumbnail to ensure it meets Living Atlas-specific rules.
import { isValidUserProfileThumbnail } from '@vannizhang/living-atlas-content-validator';
isValidUserProfileThumbnail(
userProfile: IUser
): ValidationInfoParameters:
userProfile(IUser, required): The user profile of the item's owner.
Returns:
ValidationInfo: An object containing the validation results for the user profile thumbnail.
Example:
import { isValidUserProfileThumbnail } from '@vannizhang/living-atlas-content-validator';
const userProfile = {
thumbnail: 'custom-thumbnail.png',
// Other properties...
};
const validationInfo = isValidUserProfileThumbnail(userProfile);
console.log(validationInfo);checkFeatureServiceFieldAliases
This function checks the provided feature layers for relevant fields and evaluates whether those fields have aliases defined.
import { checkFeatureServiceFieldAliases } from '@vannizhang/living-atlas-content-validator';
checkFeatureServiceFieldAliases(
item: IItem,
featureLayers: FeatureLayerJSON[]
): ValidationInfoParameters:
item(IItem, required): The ArcGIS Online item to validatefeatureLayers(FeatureLayerJSON[], required): An array ofFeature Layer JSONobjects representing the feature layers published to this feature service to check for field aliases.
Returns:
ValidationInfo: An object containing the validation result, messages, and scoring for field aliases.
Example:
import { checkFeatureServiceFieldAliases } from '@vannizhang/living-atlas-content-validator';
const item = {
id: 'mock-feature-layer-id',
type: 'Feature Service',
// Other properties...
};
const featureLayers = [
{
fields: [
{ name: 'field1', alias: 'Field 1' },
{ name: 'field2', alias: '' },
// Other fields...
],
// Other properties...
}
// Additional feature layers if needed...
];
const validationInfo = checkFeatureServiceFieldAliases(item, featureLayers);
console.log(validationInfo);checkFeatureServiceFieldDescriptions
This function checks if the given item is a feature layer and evaluates the presence of field descriptions for relevant fields within the provided feature layers.
import { checkFeatureServiceFieldDescriptions } from '@vannizhang/living-atlas-content-validator';
checkFeatureServiceFieldDescriptions(
item: IItem,
featureLayers: FeatureLayerJSON[]
): ValidationInfoParameters:
item(IItem, required): The ArcGIS Online item to validate, expected to be a feature layer.featureLayers(FeatureLayerJSON[], required): An array ofFeature Layer JSONobjects representing the feature layers published to this feature service to check for field descriptions.
Returns:
ValidationInfo: An object containing the validation result, messages, score, and scoring factors for field descriptions.
Example:
import { checkFeatureServiceFieldDescriptions } from '@vannizhang/living-atlas-content-validator';
const item = {
id: 'mock-feature-layer-id',
type: 'Feature Service',
// Other properties...
};
const featureLayers = [
{
fields: [
{ name: 'field1', description: { value: 'Description for field 1' } },
{ name: 'field2', description: { value: '' } },
// Other fields...
],
// Other properties...
}
// Additional feature layers if needed...
];
const validationInfo = checkFeatureServiceFieldDescriptions(item, featureLayers);
console.log(validationInfo);checkFeatureServiceFieldValueTypes
This function checks the provided feature layers for relevant fields and evaluates whether those fields have a fieldValueType defined in their descriptions.
import { checkFeatureServiceFieldValueTypes } from '@vannizhang/living-atlas-content-validator';
checkFeatureServiceFieldValueTypes(
item: IItem,
featureLayers: FeatureLayerJSON[]
): ValidationInfoParameters:
item(IItem, required): The ArcGIS Online item to validate.featureLayers(FeatureLayerJSON[], required): An array ofFeature Layer JSONobjects representing the feature layers published to this feature service.
Returns:
ValidationInfo: An object containing the validation result, messages, and scoring for field value types.
Example:
import { checkFeatureServiceFieldValueTypes } from '@vannizhang/living-atlas-content-validator';
const item = {
id: 'mock-feature-layer-id',
type: 'Feature Service',
// Other properties...
};
const featureLayers = [
{
fields: [
{ name: 'field1', description: { fieldValueType: 'type1' } },
{ name: 'field2', description: { fieldValueType: '' } },
// Other fields...
],
// Other properties...
}
// Additional feature layers if needed...
];
const validationInfo = checkFeatureServiceFieldValueTypes(item, featureLayers);
console.log(validationInfo);checkTitleAndSnippetSearchability
Checks for required and recommended text in an item's title and summary (snippet) to ensure they are search-friendly.
import { checkTitleAndSnippetSearchability } from '@vannizhang/living-atlas-content-validator';
checkTitleAndSnippetSearchability(
item: IItem,
options?: {
customPatternsForLocationInfo?: string[];
customPatternsForDataVintageInfo?: string[];
customPatternsForSourceInfo?: string[];
customPatternsForTopicInfo?: string[];
}
): ValidationInfoParameters:
item(IItem, required): The ArcGIS Online item whose title and snippet need validation.options(optional): Custom patterns for matching specific information.customPatternsForLocationInfo(string[]): Custom patterns for location information.customPatternsForDataVintageInfo(string[]): Custom patterns for data vintage information.customPatternsForSourceInfo(string[]): Custom patterns for source information.customPatternsForTopicInfo(string[]): Custom patterns for topic information.
Returns:
ValidationInfo: An object containing the validation results for the title and snippet.
Example:
import { checkTitleAndSnippetSearchability } from '@vannizhang/living-atlas-content-validator';
const item = {
title: 'Global Earthquake Data 2023',
snippet: 'Earthquake data from NOAA for the year 2023.',
// Other properties...
};
const options = {
customPatternsForLocationInfo: ['Global', 'New York'],
customPatternsForDataVintageInfo: ['2023', 'Monthly'],
customPatternsForSourceInfo: ['NOAA', 'Esri'],
customPatternsForTopicInfo: ['Earthquakes', 'Public Health Dashboard'],
};
const validationInfo = checkTitleAndSnippetSearchability(item, options);
console.log(validationInfo);checkFeatureServiceCDNSetting
This function checks the CDN setting of the provided Feature Service item using its administrative JSON data. It evaluates whether the CDN is enabled and provides relevant messages. This check is advisory and does not impact the overall validation score of the item. If the CDN is not enabled, a warning message is returned to inform the user about the benefits of enabling CDN for better performance and scalability.
import { checkFeatureServiceCDNSetting } from '@vannizhang/living-atlas-content-validator';
checkFeatureServiceCDNSetting(
item: IItem,
featureServiceAdminJSON: FeatureServiceAdminJSON
): ValidationInfoParameters:
item(IItem, required): The ArcGIS Online Feature Service item to validatefeatureServiceAdminJSON(FeatureServiceAdminJSON, required): TheFeature Service Admin JSONobject representing the Feature Service item's administrative settings.
Returns:
ValidationInfo: An object containing the validation result, messages for the CDN setting.
Example:
import { checkFeatureServiceCDNSetting } from '@vannizhang/living-atlas-content-validator';
const item = {
id: 'mock-feature-service-id',
type: 'Feature Service',
// Other properties...
};
const featureServiceAdminJSON = {
adminServiceInfo: {
"name": "Mock Feature Service",
"type": "FeatureServer",
"cacheMaxAge": 3600,
},
// Other properties...
};
const validationInfo = checkFeatureServiceCDNSetting(item, featureServiceAdminJSON);
console.log(validationInfo);checkFeatureServiceExportSetting
This function checks the export setting of the provided Feature Service item using its administrative JSON data. It evaluates whether the export capability is enabled and provides relevant messages. This check is advisory and does not impact the overall validation score of the item. If the export setting is enabled, a warning message is returned to inform the user to make sure that exporting data aligns with their data sharing policies.
import { checkFeatureServiceExportSetting } from '@vannizhang/living-atlas-content-validator';
checkFeatureServiceExportSetting(
item: IItem,
featureServiceAdminJSON: FeatureServiceAdminJSON
): ValidationInfoParameters:
item(IItem, required): The ArcGIS Online Feature Service item to validatefeatureServiceAdminJSON(FeatureServiceAdminJSON, required): TheFeature Service Admin JSONobject representing the Feature Service item's administrative settings.
Returns:
ValidationInfo: An object containing the validation result, messages for the export setting.
Example:
import { checkFeatureServiceExportSetting } from '@vannizhang/living-atlas-content-validator';
const item = {
id: 'mock-feature-service-id',
type: 'Feature Service',
// Other properties...
};
const featureServiceAdminJSON = {
capabilities: 'Query,Export',
// Other properties...
};
const validationInfo = checkFeatureServiceExportSetting(item, featureServiceAdminJSON);
console.log(validationInfo);checkItemExtent
This function checks whether the provided item's spatial extent is valid and meaningful. It evaluates if the extent is defined, not empty, and represents a real-world area.
import { checkItemExtent } from '@vannizhang/living-atlas-content-validator';
checkItemExtent(
item: IItem
): ValidationInfoParameters:
item(IItem, required): The ArcGIS Online item to validate.
Returns:
ValidationInfo: An object containing the validation result, messages, and scoring for the item's
Example:
import { checkItemExtent } from '@vannizhang/living-atlas-content-validator';
const item = {
extent: [[-120, -45], [120, 45]], // Example extent
// Other properties...
};
const validationInfo = checkItemExtent(item);
console.log(validationInfo);checkFeatureServiceExtents
This function checks whether the provided feature service has valid initial and full extents defined in its service root JSON. It also checks the extents of each feature layer within the service to ensure they are provided.
import { checkFeatureServiceExtents } from '@vannizhang/living-atlas-content-validator';
checkFeatureServiceExtents(
item: IItem,
{
featureLayers: FeatureLayerJSON[]
featureServiceAdminJSON: FeatureServiceAdminJSON,
featureServiceRootJSON: FeatureServiceRootJSON
}
): ValidationInfoParameters:
item(IItem, required): The ArcGIS Online Feature Service item to validateoptions(required): An object containing:featureLayers(FeatureLayerJSON[], required): An array ofFeature Layer JSONobjects representing the feature layers published to this feature service.featureServiceAdminJSON(FeatureServiceAdminJSON, optional): TheFeature Service Admin JSONobject representing the Feature Service item's administrative settings. If not provided, only the feature service root JSON will be used for extent validation.featureServiceRootJSON(FeatureServiceRootJSON, optional): TheFeature Service Root JSONobject representing the root information of the Feature Service. This is used to validate the initial and full extents of the feature service if the admin JSON is not provided.
Returns:
ValidationInfo: An object containing the validation result, messages, and scoring for the feature service extents.
Example:
import { checkFeatureServiceExtents } from '@vannizhang/living-atlas-content-validator';
// An ArcGIS Online Feature Service item to validate
const item = {
id: 'mock-feature-service-id',
type: 'Feature Service',
// Other properties...
};
// feature layers associated with the Feature Service item
const featureLayers = [
{
id: 0,
name: 'Mock Layer',
extent: {
xmin: -120,
ymin: -45,
xmax: 120,
ymax: 45,
spatialReference: { wkid: 4326 }
}
}
// Additional feature layers if needed...
];
// Feature Service Admin JSON object
const featureServiceAdminJSON = {
// Mock Feature Service Admin JSON properties...
initialExtent: {
xmin: -120,
ymin: -45,
xmax: 120,
ymax: 45,
spatialReference: { wkid: 4326 }
},
fullExtent: {
xmin: -180,
ymin: -90,
xmax: 180,
ymax: 90,
spatialReference: { wkid: 4326 }
},
};
const validationInfo = checkFeatureServiceExtents(item, { featureLayers, featureServiceAdminJSON });API Reference - Helper Functions
These are helper functions used internally by the core validation functions, but they can also be called independently for specific use cases. For example, a user may call checkIsLivingAtlasSupportedItemType to determine if an item is a supported Living Atlas type before invoking validate. Similarly, isRecognizedLocation can be used to verify whether a string qualifies as recognized location information before using it as a custom pattern in matchLocationInfo.
isEligibleForCheckingTitleAndSnippetSearchability
Determines if an item is eligible for checking title and snippet searchability.
import { isEligibleForCheckingTitleAndSnippetSearchability } from '@vannizhang/living-atlas-content-validator';
isEligibleForCheckingTitleAndSnippetSearchability(
item: IItem
): booleanParameters:
item(IItem, required): The ArcGIS Online item to check.
Returns:
boolean:trueif the item meets the criteria for checking title and snippet searchability, otherwisefalse.
Eligibility Criteria:
- The item is a layer.
- The item is English-based.
Remarks:
- The locale is determined by both the item's
cultureproperty and the item's owner.
Example:
import { isEligibleForCheckingTitleAndSnippetSearchability } from '@vannizhang/living-atlas-content-validator';
const item = {
id: 'mock-item-id',
owner: 'mock-owner',
title: 'Mock Item Title',
culture: 'en',
type: 'Feature Layer',
// Other properties...
};
const isEligible = isEligibleForCheckingTitleAndSnippetSearchability(item);
console.log(isEligible); // true or falsematchLocationInfo
Matches location information from an item's title and snippet using predefined or custom matching patterns.
import { matchLocationInfo } from '@vannizhang/living-atlas-content-validator';
matchLocationInfo(
item: IItem,
customMatchingPatterns?: string[]
): MatchResult[]Parameters:
item(IItem, required): The ArcGIS Online item containing the title and snippet to search for location information.customMatchingPatterns(string[], optional): Custom matching patterns to include in the search.
Returns:
MatchResult[]: An array of matched results for location information after deduplication and removing overlaps.
Example:
import { matchLocationInfo } from '@vannizhang/living-atlas-content-validator';
const item = {
title: 'Earthquake Data for California',
snippet: 'This dataset provides earthquake information for the state of California.',
// Other properties...
};
const customPatterns = ['California', 'Los Angeles'];
const matchedLocations = matchLocationInfo(item, customPatterns);
console.log(matchedLocations);isRecognizedLocation
Determines if a given string is recognized as location information.
import { isRecognizedLocation } from '@vannizhang/living-atlas-content-validator';
isRecognizedLocation(
str: string
): booleanParameters:
str(string, required): The string to check.
Returns:
boolean:trueif the string is recognized as location information,falseotherwise.
Example:
import { isRecognizedLocation } from '@vannizhang/living-atlas-content-validator';
const location = 'California';
const isRecognized = isRecognizedLocation(location);
console.log(isRecognized); // true or falseisRejectedLocationInfo
Determines if a given string is rejected as location information.
import { isRejectedLocationInfo } from '@vannizhang/living-atlas-content-validator';
isRejectedLocationInfo(
str: string
): booleanParameters:
str(string, required): The string to check.
Returns:
boolean:trueif the string is rejected as location information,falseotherwise.
Example:
import { isRejectedLocationInfo } from '@vannizhang/living-atlas-content-validator';
const location = 'Unknown Location';
const isRejected = isRejectedLocationInfo(location);
console.log(isRejected); // true or falsematchSourceInfo
Matches source information from an item's title and snippet using predefined or custom matching patterns.
import { matchSourceInfo } from '@vannizhang/living-atlas-content-validator';
matchSourceInfo(
item: IItem,
customMatchingPatterns?: string[]
): MatchResult[]Parameters:
item(IItem, required): The ArcGIS Online item containing the title and snippet to search for source information.customMatchingPatterns(string[], optional): Custom matching patterns to include in the search.
Returns:
MatchResult[]: An array of matched results for source information after deduplication and removing overlaps.
Example:
import { matchSourceInfo } from '@vannizhang/living-atlas-content-validator';
const item = {
title: 'Earthquake Data from NOAA',
snippet: 'This dataset provides earthquake information sourced from NOAA.',
// Other properties...
};
const customPatterns = ['NOAA', 'USGS'];
const matchedSources = matchSourceInfo(item, customPatterns);
console.log(matchedSources);isRecognizedSource
Determines if a given string is recognized as source information.
import { isRecognizedSource } from '@vannizhang/living-atlas-content-validator';
isRecognizedSource(
str: string
): booleanParameters:
str(string, required): The string to check.
Returns:
boolean:trueif the string is recognized as source information,falseotherwise.
Example:
import { isRecognizedSource } from '@vannizhang/living-atlas-content-validator';
const source = 'NOAA';
const isRecognized = isRecognizedSource(source);
console.log(isRecognized); // true or falseisRejectedSourceInfo
Determines if a given string is rejected as source information.
import { isRejectedSourceInfo } from '@vannizhang/living-atlas-content-validator';
isRejectedSourceInfo(
str: string
): booleanParameters:
str(string, required): The string to check.
Returns:
boolean:trueif the string is rejected as source information,falseotherwise.
Example:
import { isRejectedSourceInfo } from '@vannizhang/living-atlas-content-validator';
const source = 'Unknown Source';
const isRejected = isRejectedSourceInfo(source);
console.log(isRejected); // true or falsematchTopicInfo
Matches topic information from an item's title and snippet using predefined or custom matching patterns.
import { matchTopicInfo } from '@vannizhang/living-atlas-content-validator';
matchTopicInfo(
item: IItem,
customMatchingPatterns?: string[]
): MatchResult[]Parameters:
item(IItem, required): The ArcGIS Online item containing the title and snippet to search for topic information.customMatchingPatterns(string[], optional): Custom matching patterns to include in the search.
Returns:
MatchResult[]: An array of matched results for topic information after deduplication and removing overlaps.
Example:
import { matchTopicInfo } from '@vannizhang/living-atlas-content-validator';
const item = {
title: 'Climate Change Impact Analysis',
snippet: 'This dataset provides insights into the impact of climate change on global ecosystems.',
// Other properties...
};
const customPatterns = ['Climate Change', 'Global Warming'];
const matchedTopics = matchTopicInfo(item, customPatterns);
console.log(matchedTopics);isRecognizedTopic
Determines if a given string is recognized as topic information.
import { isRecognizedTopic } from '@vannizhang/living-atlas-content-validator';
isRecognizedTopic(
str: string
): booleanParameters:
str(string, required): The string to check.
Returns:
boolean:trueif the string is recognized as topic information,falseotherwise.
Example:
import { isRecognizedTopic } from '@vannizhang/living-atlas-content-validator';
const topic = 'Climate Change';
const isRecognized = isRecognizedTopic(topic);
console.log(isRecognized); // true or falseisRejectedTopicInfo
Determines if a given string is rejected as topic information.
import { isRejectedTopicInfo } from '@vannizhang/living-atlas-content-validator';
isRejectedTopicInfo(
str: string
): booleanParameters:
str(string, required): The string to check.
Returns:
boolean:trueif the string is rejected as topic information,falseotherwise.
Example:
import { isRejectedTopicInfo } from '@vannizhang/living-atlas-content-validator';
const topic = 'Unknown Topic';
const isRejected = isRejectedTopicInfo(topic);
console.log(isRejected); // true or falsematchDateTimeInfo
Matches date and time information from an item's title and snippet using predefined or custom matching patterns.
import { matchDateTimeInfo } from '@vannizhang/living-atlas-content-validator';
matchDateTimeInfo(
item: IItem,
customMatchingPatterns?: string[]
): MatchResult[]Parameters:
item(IItem, required): The ArcGIS Online item containing the title and snippet to search for date and time information.customMatchingPatterns(string[], optional): Custom matching patterns to include in the search.
Returns:
MatchResult[]: An array of matched results for date and time information after deduplication and removing overlaps.
Example:
import { matchDateTimeInfo } from '@vannizhang/living-atlas-content-validator';
const item = {
title: 'Climate Data for 2020-2025',
snippet: 'This dataset provides monthly climate data for the years 2020 to 2025.',
// Other properties...
};
const customPatterns = ['2020', '2025'];
const matchedDateTimeInfo = matchDateTimeInfo(item, customPatterns);
console.log(matchedDateTimeInfo);isRecognizedDateTimeInfo
Determines if a given string is recognized as date and time information.
import { isRecognizedDateTimeInfo } from '@vannizhang/living-atlas-content-validator';
isRecognizedDateTimeInfo(
str: string
): booleanParameters:
str(string, required): The string to check.
Returns:
boolean:trueif the string is recognized as date and time information,falseotherwise.
Example:
import { isRecognizedDateTimeInfo } from '@vannizhang/living-atlas-content-validator';
const dateTimeInfo = '2020-2025';
const isRecognized = isRecognizedDateTimeInfo(dateTimeInfo);
console.log(isRecognized); // true or falseisRejectedDateTimeInfo
Determines if a given string is rejected as date and time information.
import { isRejectedDateTimeInfo } from '@vannizhang/living-atlas-content-validator';
isRejectedDateTimeInfo(
str: string
): booleanParameters:
str(string, required): The string to check.
Returns:
boolean:trueif the string is rejected as date and time information,falseotherwise.
Example:
import { isRejectedDateTimeInfo } from '@vannizhang/living-atlas-content-validator';
const dateTimeInfo = 'Unknown Year';
const isRejected = isRejectedDateTimeInfo(dateTimeInfo);
console.log(isRejected); // true or falsegetLivingAtlasSupportedItemTypes
This function returns an array containing all the predefined item types that are supported by Living Atlas from the configuration.
import { getLivingAtlasSupportedItemTypes } from '@vannizhang/living-atlas-content-validator';
getLivingAtlasSupportedItemTypes(): LivingAtlasSupportedItemType[]Returns:
LivingAtlasSupportedItemType[]: An array of Living Atlas supported item types.
Example:
import { getLivingAtlasSupportedItemTypes } from '@vannizhang/living-atlas-content-validator';
const supportedItemTypes = getLivingAtlasSupportedItemTypes();
console.log(supportedItemTypes);checkIsLivingAtlasSupportedItemType
This function determines whether the provided item type string is included in the predefined list of item types supported by Living Atlas.
import { checkIsLivingAtlasSupportedItemType } from '@vannizhang/living-atlas-content-validator';
checkIsLivingAtlasSupportedItemType(
item: IItem
): booleanParameters:
item(IItem, required): The ArcGIS Online item to check.
Returns:
boolean:trueif the item type is supported by Living Atlas, otherwisefalse.
Example:
import { checkIsLivingAtlasSupportedItemType } from '@vannizhang/living-atlas-content-validator';
const item = {
id: 'mock-item-id',
type: 'Web Map',
// Other properties...
};
const isSupported = checkIsLivingAtlasSupportedItemType(item);
console.log(isSupported); // true or falseTypes
ValidationResult
The ValidationResult type represents the output of the validate function, providing detailed assessments for both the ArcGIS Online item and its owner's profile. It helps determine whether an item meets the necessary criteria for nomination to the ArcGIS Living Atlas.
/**
* Represents the result of validating an ArcGIS Online item and its owner's profile.
*
* This type is returned by the `validate` function and contains detailed validation results
* for both the item and its owner's profile, as well as overall scoring and nomination eligibility.
*/
export type ValidationResult = {
/**
* Validation results for the ArcGIS Online item.
* Each property corresponds to a specific validation rule applied to the item.
*/
validatedItem: {
/**
* Validation result for the item's sharing level (access).
*/
access: ValidationInfo;
/**
* Validation result for the item's credits/attribution information.
*/
accessInformation: ValidationInfo;
/**
* Validation result for the item's description text.
*/
description: ValidationInfo;
/**
* Validation result for the item's license information.
*/
licenseInfo: ValidationInfo;
/**
* Validation result for the item's snippet (summary text).
*/
snippet: ValidationInfo;
/**
* Validation result for the item's HTTPS URL.
*/
ssl: ValidationInfo;
/**
* Validation result for the item's tags.
*/
tags: ValidationInfo;
/**
* Validation result for the item's thumbnail image.
*/
thumbnail: ValidationInfo;
/**
* Validation result for the item's title.
*/
title: ValidationInfo;
/**
* Validation result for the item's deprecated/content status.
*/
deprecated: ValidationInfo;
/**
* Validation result for the item's delete protection property.
*/
deleteProtection: ValidationInfo;
/**
* Validation result for searchability the item's title and summary.
* Applicable only to English layer items.
*/
recommendedTextInTitleAndSummary: ValidationInfo;
/**
* Validation result for field aliases in feature layers of a feature service item.
* Applicable only to feature service items.
*/
featureServiceFieldAliases: ValidationInfo;
/**
* Validation result for field descriptions in feature layers of a feature service item.
* Applicable only to feature service items.
*/
featureServiceFieldDescriptions: ValidationInfo;
/**
* Validation result for field value types in feature layers of a feature service item.
* Applicable only to feature service items.
*/
featureServiceFieldValueTypes: ValidationInfo;
};
/**
* Validation results for the item owner's profile.
* Each property corresponds to a specific validation rule applied to the user profile.
*/
validatedProfile: {
/**
* Validation result for the owner's profile description.
*/
userProfileDescription: ValidationInfo;
/**
* Validation result for the owner's full name.
*/
userProfileFullName: ValidationInfo;
/**
* Validation result for the owner's thumbnail image.
*/
userProfileThumbnail: ValidationInfo;
};
/**
* advisory validation results that do not impact the overall score.
*/
advisories: {
/**
* Advisory validation result for CDN settings of a feature service item.
*/
featureServiceCdnSetting: null,
/**
* Advisory validation result for field indexes of a feature service item.
*/
featureServiceFieldIndexes: null,
/**
* Advisory validation result for data export settings of a feature service item.
*/
featureServiceExportDataSetting: null,
},
/**
* The ArcGIS Online Item ID.
*/
id: string;
/**
* The total score calculated from all validation rules.
*/
totalScore: number;
/**
* Indicates if the item meets all minimum requirements and can be nominated to Living Atlas.
*
* An item is eligible for nomination if:
* - The total score meets the minimum threshold (e.g., 80).
* - It is shared with the public.
* - The thumbnail image meets required dimensions.
* - It has a snippet (summary) text.
* - It has a description text.
* - The item owner has a user profile description.
*/
canBeNominated: boolean;
};ValidationResultStatus
Represents the status of a validation result for a specific rule. This type indicates the outcome of the validation process for each rule and helps in understanding how well the item meets the criteria defined by the validation rules.
pass: The item meets the criteria for this validation rule.warning: The item meets the criteria but there are some suggestions for improvement or potential issues to address.error: The item does not meet the criteria for this validation rule and requires correction.not-applicable: Indicates that the validation rule is not applicable to the item being validated. This can happen if the rule does not apply to the type of item or if certain conditions are not met for the validation to be relevant.unknown: This is the default status when aValidationInfoobject is created but the validation process has not yet been executed. It indicates that the validation status is yet to be determined.
export type ValidationResultStatus =
| 'pass'
| 'warning'
| 'error'
| 'not-applicable'
| 'unknown';ValidationInfo
The ValidationInfo type provides detailed information about a specific validation rule, including its purpose, scoring criteria, and status.
export type ValidationInfo = {
/**
* The identifier of the validation rule, e.g., "item-sharing-level" or "item-description".
* It serves as a unique, human-readable identifier for each rule.
*/
validationRuleId: ValidationRuleId;
/**
* The title string tells the user what this validation rule checks, e.g., "Check Thumbnail" or "Check Number of Layers".
*/
title: string;
/**
* The label text will be used to instruct the user what they should do, e.g., "Improve Thumbnail" or "Reduce Number of Layers".
*/
label: string;
/**
* array of validation messages
*/
messages: ValidationMessage[];
/**
* Maximum score this validation rule can receive.
*/
maxScore: number;
/**
* Final score that the item received for this validation rule.
*/
score: number;
/**
* Weight assigned to this validation rule.
*/
weight: number;
/**
* A scoring factor ranging between 0 and 1 used to calculate the final score by multiplying it with the weight number.
* 0 means the validation rule received no points, while 1 means it received the maximum score.
*/
scoringFactor: number;
/**
* Status of the validation result
*/
status: ValidationResultStatus;
/**
* if true, this validation rule is a binary check, i.e., it can only pass or fail.
*/
isBinaryCheck: boolean;
/**
* if true, this validation rule is advisory and does not impact the overall score.
*/
isAdvisory: boolean;
};MatchResult
Represents the result of a pattern match operation.
export type MatchResult = {
/**
* The string that was matched by the pattern.
*/
matchedString: string;
/**
* The source of the pattern that was used for matching:
* - 'predefined' - This indicates that the matched string was found using predefined patterns that are built into the validator.
* - 'additional' - This indicates that the matched string was found using additional custom patterns loaded via configureSettings.
* - 'custom' - This indicates that the matched string was found using custom patterns defined by the user.
*/
patternSource: MatchPatternSource;
};FeatureLayerFieldValueType
Represents the value type of a field in a feature layer.
/**
* Represents the field value type of a feature layer.
*
* @see https://doc.arcgis.com/en/arcgis-online/manage-data/describe-fields.htm
* @see https://www.esri.com/arcgis-blog/products/arcgis-online/data-management/describing-layer-attributes-with-field-descriptions-march-2019
*/
export type FeatureLayerFieldValueType =
| 'nameOrTitle'
| 'description'
| 'typeOrCategory'
| 'countOrAmount'
| 'percentageOrRatio'
| 'measurement'
| 'uniqueIdentifier'
| 'orderedOrRanked'
| 'binary'
| 'locationOrPlaceName'
| 'coordinate'
| 'dateAndTime';
FeatureLayerJSON
Represents the JSON structure of a feature layer.
/**
* Represents a Feature Layer in JSON format.
*
* An individual Feature Layer resource represents a single feature layer or a non-spatial table in a feature service.
* - For tables, it provides basic information about the table such as its ID, name, fields, types and templates.
* - For feature layers, in addition to the table information above, it provides information such as its geometry type, min and max scales, and spatial reference. A feature layer is a table or view with at least one spatial column.
*
* @see https://developers.arcgis.com/rest/services-reference/enterprise/feature-layer/
*/
export type FeatureLayerJSON = {
id: number;
name: string;
type: string;
description: string;
copyrightText: string;
supportsRollbackOnFailures: boolean;
geometryType?: string;
minScale?: number;
maxScale?: number;
'extent?': {
xmin: number;
ymin: number;
xmax: number;
ymax: number;
spatialReference: {
wkid: number;
latestWkid: number;
};
};
/**
* the feature layer's fields
*/
fields: FeatureLayerField[];
};Weight-Based Scoring System
The evaluation process uses a weight-based scoring system, where each validation rule is assigned a specific weight to indicate its relative importance in the overall score calculation. A higher weight means the rule has more impact on the final score. Setting a rule’s weight to zero effectively excludes it from the scoring process—this typically happens when a rule is not applicable to the item being evaluated.
Below is the list of weights assigned to each validation rule:
| Validation Rule | Weight | |--------------------------
