
Research
/Security News
Chrome and Firefox Extensions Posing as Free VPNs Add Clipboard Stealers via Malicious Updates
Malicious Chrome and Firefox extensions posed as free VPNs while stealing clipboard data through later extension updates.
@fluojs/validation
Advanced tools
Input-side validation decorators, mapped DTO helpers, and validation engine for Fluo.
English 한국어
Input-side validation decorators, mapped DTO helpers, and the materialization engine for fluo.
pnpm add @fluojs/validation
PickType, PartialType, and IntersectionType@ValidateClass(...)import { DefaultValidator, DtoValidationError, IsEmail, IsString, MinLength } from '@fluojs/validation';
class CreateUserDto {
@IsEmail()
email = '';
@IsString()
@MinLength(2)
name = '';
}
const validator = new DefaultValidator();
try {
const dto = await validator.materialize(
{ email: 'hello@example.com', name: 'fluo' },
CreateUserDto,
);
console.log(dto instanceof CreateUserDto);
} catch (error) {
if (error instanceof DtoValidationError) {
console.log(error.issues);
}
}
materialize() vs validate()materialize(value, Target) builds a typed instance and validates it recursivelyvalidate(instance, Target) only validates an already-created valueimport { IsEmail, IsString, PartialType, PickType } from '@fluojs/validation';
class UserDto {
@IsString() name = '';
@IsEmail() email = '';
}
class EmailOnlyDto extends PickType(UserDto, ['email']) {}
class UpdateUserDto extends PartialType(UserDto) {}
Standard Schema adapters are expected to report invalid input through explicit issues. Validation results without issues are treated as successful.
import { ValidateClass } from '@fluojs/validation';
import { z } from 'zod';
const UserSchema = z.object({ age: z.number().min(18) });
@ValidateClass(UserSchema)
class RestrictedUserDto {
age = 0;
}
materialize() is intentionally strict. If a transport gives you '42' and your DTO expects number, the transport or binding layer must convert it first.
DefaultValidator, DtoValidationError, ValidationIssueIsString, IsNumber, IsBoolean, IsEmail, IsUrl, ValidateNested, ValidateIf, IsOptional, ValidateClassPickType, OmitType, PartialType, IntersectionTypematerialize() for hydration + validation, validate() for validation-only checks@fluojs/http: binds request data, then uses this package to validate it@fluojs/serialization: shapes output DTOs on the response side@fluojs/core: provides the metadata primitives used by validation decoratorspackages/validation/src/validation.test.tsexamples/realworld-api/src/users/create-user.dto.tsexamples/auth-jwt-passport/src/auth/login.dto.tsFAQs
Input-side validation decorators, mapped DTO helpers, and validation engine for Fluo.
The npm package @fluojs/validation receives a total of 41 weekly downloads. As such, @fluojs/validation popularity was classified as not popular.
We found that @fluojs/validation demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Malicious Chrome and Firefox extensions posed as free VPNs while stealing clipboard data through later extension updates.

Research
/Security News
Miasma Mini Shai-Hulud hits @immobiliarelabs Backstage plugins, targeting GitLab and LDAP auth packages on npm.

Security News
Rolldown paused Rust React Compiler integration after a 5MB binary size increase raised concerns about shipping React-specific code to all Vite users.