class-validator

Open-source projects categorized as class-validator

Top 4 class-validator Open-Source Projects

  • nestia

    Make NestJS much faster and easier

  • Project mention: I revived TypeScript RPC framework for WebSocket (+NestJS) and Worker protocols from 8 years ago. | dev.to | 2024-05-18

    /** * @packageDocumentation * @module api.functional.calculate * @nestia Generated by Nestia - https://github.com/samchon/nestia */ //================================================================ import type { IConnection, Primitive } from "@nestia/fetcher"; import { PlainFetcher } from "@nestia/fetcher/lib/PlainFetcher"; import { WebSocketConnector } from "tgrid"; import type { Driver } from "tgrid"; import type { ICalcConfig } from "../../interfaces/ICalcConfig"; import type { ICalcEventListener } from "../../interfaces/ICalcEventListener"; import type { ICompositeCalculator } from "../../interfaces/ICompositeCalculator"; import type { IScientificCalculator } from "../../interfaces/IScientificCalculator"; import type { ISimpleCalculator } from "../../interfaces/ISimpleCalculator"; import type { IStatisticsCalculator } from "../../interfaces/IStatisticsCalculator"; /** * Health check API (HTTP GET). * * @controller CalculateController.health * @path GET /calculate/health * @nestia Generated by Nestia - https://github.com/samchon/nestia */ export async function health(connection: IConnection): Promise { return PlainFetcher.fetch(connection, { ...health.METADATA, path: health.path(), }); } export namespace health { export type Output = Primitive; export const METADATA = { method: "GET", path: "/calculate/health", request: null, response: { type: "application/json", encrypted: false, }, status: null, } as const; export const path = () => "/calculate/health"; } /** * Prepare a composite calculator. * * @controller CalculateController.composite * @path /calculate/composite * @nestia Generated by Nestia - https://github.com/samchon/nestia */ export async function composite( connection: IConnection, provider: composite.Provider, ): Promise { const connector: WebSocketConnector< composite.Header, composite.Provider, composite.Listener > = new WebSocketConnector(connection.headers ?? ({} as any), provider); await connector.connect( `${connection.host.endsWith("/") ? connection.host.substring(0, connection.host.length - 1) : connection.host}${composite.path()}`, ); const driver: Driver = connector.getDriver(); return { connector, driver, }; } export namespace composite { export type Output = { connector: WebSocketConnector; driver: Driver; }; export type Header = ICalcConfig; export type Provider = ICalcEventListener; export type Listener = ICompositeCalculator; export const path = () => "/calculate/composite"; } /** * Prepare a simple calculator. * * @controller CalculateController.simple * @path /calculate/simple * @nestia Generated by Nestia - https://github.com/samchon/nestia */ export async function simple( connection: IConnection, provider: simple.Provider, ): Promise { const connector: WebSocketConnector< simple.Header, simple.Provider, simple.Listener > = new WebSocketConnector(connection.headers ?? ({} as any), provider); await connector.connect( `${connection.host.endsWith("/") ? connection.host.substring(0, connection.host.length - 1) : connection.host}${simple.path()}`, ); const driver: Driver = connector.getDriver(); return { connector, driver, }; } export namespace simple { export type Output = { connector: WebSocketConnector; driver: Driver; }; export type Header = ICalcConfig; export type Provider = ICalcEventListener; export type Listener = ISimpleCalculator; export const path = () => "/calculate/simple"; } /** * Prepare a scientific calculator. * * @controller CalculateController.scientific * @path /calculate/scientific * @nestia Generated by Nestia - https://github.com/samchon/nestia */ export async function scientific( connection: IConnection, provider: scientific.Provider, ): Promise { const connector: WebSocketConnector< scientific.Header, scientific.Provider, scientific.Listener > = new WebSocketConnector(connection.headers ?? ({} as any), provider); await connector.connect( `${connection.host.endsWith("/") ? connection.host.substring(0, connection.host.length - 1) : connection.host}${scientific.path()}`, ); const driver: Driver = connector.getDriver(); return { connector, driver, }; } export namespace scientific { export type Output = { connector: WebSocketConnector; driver: Driver; }; export type Header = ICalcConfig; export type Provider = ICalcEventListener; export type Listener = IScientificCalculator; export const path = () => "/calculate/scientific"; } /** * Prepare a statistics calculator. * * @controller CalculateController.statistics * @path /calculate/statistics * @nestia Generated by Nestia - https://github.com/samchon/nestia */ export async function statistics( connection: IConnection, provider: statistics.Provider, ): Promise { const connector: WebSocketConnector< statistics.Header, statistics.Provider, statistics.Listener > = new WebSocketConnector(connection.headers ?? ({} as any), provider); await connector.connect( `${connection.host.endsWith("/") ? connection.host.substring(0, connection.host.length - 1) : connection.host}${statistics.path()}`, ); const driver: Driver = connector.getDriver(); return { connector, driver, }; } export namespace statistics { export type Output = { connector: WebSocketConnector; driver: Driver; }; export type Header = ICalcConfig; export type Provider = ICalcEventListener; export type Listener = IStatisticsCalculator; export const path = () => "/calculate/statistics"; }

  • resolvers

    📋 Validation resolvers: Yup, Zod, AJV, Joi, Superstruct, Vest, class-validator, io-ts, typanion, Ajv, TypeBox, Valibot and nope.

  • Project mention: React-Hook-Form / YupResolver - Vercel build fails but local build is ok | /r/nextjs | 2023-09-20

    For anyone that reaches this post trying to obtain an answer, I found this issue in the react-hook-form repository. Specifically the comment that Mihai-github made.

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • react-formawesome

    React UI lib for validation forms

  • TNG

    📝 [Snippets] Typescript - Next.js/Nestjs - GraphQL

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020).

Index

What are some of the best open-source class-validator projects? This list will help you:

Project Stars
1 nestia 1,640
2 resolvers 1,605
3 react-formawesome 6
4 TNG 1

Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com