Skip to content
A form input validation tool set
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs
src
.editorconfig
.gitignore
.npmignore
.travis.yml
LICENSE.md
README.md
package.json

README.md

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
    }
}
You can’t perform that action at this time.