Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/deno_class_validator/src/index.ts>MetadataStorage

Decorator-based property validation for classes.
Latest
class MetadataStorage
Re-export
import { MetadataStorage } from "https://deno.land/x/deno_class_validator@v1.0.0/src/index.ts";

Storage all metadatas.

Properties

private
constraintMetadatas: ConstraintMetadata[]
private
validationMetadatas: ValidationMetadata[]
readonly
hasValidationMetaData: boolean

Methods

Adds a new constraint metadata.

Adds a new validation metadata.

Adds a new validation metadata.

getTargetValidationMetadatas(
targetConstructor: Function,
targetSchema: string,
always: boolean,
strictGroups: boolean,
groups?: string[],
): ValidationMetadata[]

Gets all validation metadatas for the given object with the given groups.

Gets all validator constraints for the given object.

groupByPropertyName(metadata: ValidationMetadata[]): { [propertyName: string]: ValidationMetadata[]; }

Groups metadata by their property names.