Constructor initializes built-in validators on first singleton creation
StaticInstanceGet a validator by constraint type
Constraint type (e.g., 'subset-of-entity-fields')
Validator instance, or undefined if not registered
Use GetAll.
Get all registered validators
Map of constraint type to validator instance
The Global Object Store is a place to store global objects that need to be shared across the application. Depending on the execution environment, this could be the window object in a browser, or the global object in a node environment, or something else in other contexts. The key here is that in some cases static variables are not truly shared because it is possible that a given class might have copies of its code in multiple paths in a deployed application. This approach ensures that no matter how many code copies might exist, there is only one instance of the object in question by using the Global Object Store.
Use GetTypes.
Get list of all registered constraint types
Array of constraint type strings
Check if a validator is registered for a constraint type
Constraint type to check
True if a validator is registered
Register a semantic validator
Validators are keyed by the constraint type they handle. If a validator for the same type already exists, it will be overridden.
Validator instance to register
StaticgetOptionalclassName: stringUse Instance or GetInstance.
StaticGetGet the singleton instance of the registry
The singleton registry instance
Registry for semantic validators
Provides plugin system for validation constraints with singleton pattern to ensure validators are only instantiated once.