Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/entropy/src/validator/validator.module.ts>Validator

The core module of Entropy framework for Deno.
Latest
class Validator
import { Validator } from "https://deno.land/x/entropy@1.0.0-beta.17/src/validator/validator.module.ts";

Constructors

new
Validator()

Properties

private
readonly
configurator
private
readonly
localizator
private
readonly
patterns: Record<string, RegExp>
private
readonly
rules: ValidatorRule[]

Methods

private
check(
fieldValue: FormDataEntryValue | string | null,
ruleValue: unknown,
fieldName: string,
): Promise<boolean>
validate(
subject: HttpRequest | Record<string, string | null | undefined>,
rules: Record<string, Partial<ValidatorRulesList> | Record<string, unknown>>,
errorLocale?: string,
): Promise<Record<string, string[]>>