npm

Need private packages and team management tools?Check out npm Orgs. »

@t2ee/validation

1.0.2 • Public • Published

Introducation

This library fully uses the advantages of decorators, make it smooth to write validation rules.

For detailed introductions and examples, please visit validation.t2ee.org.

Installation

npm i reflect-metadata @t2ee/core @t2ee/validation -S

Example usage with @t2ee/vader

class Message {
    @NotNull
    @Min(4)
    message: string;
}
 
@Path('/')
@Component
class Controller {
 
    @POST
    @Path('/say')
    say(@Valid @Body message: Message) {
        // message should be at least 4 characters long
    }
}

install

npm i @t2ee/validation

Downloadsweekly downloads

1

version

1.0.2

license

Apache-2.0

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability